addScript('js/lib/form-element-pageAlias.js'); $doc->addInitObject('ElementPageAlias', array($params['id'], $params['sourceField'])); } return $this; } public function pageAlias($name, $value = null, $attribs = null) { $this->_initScripts($attribs); if (isset($attribs['sourceField'])) { unset($attribs['sourceField']); } return $this->view->formText($name, $value, $attribs); } }