本文整理汇总了PHP中AdministrationPage::addScriptToHead方法的典型用法代码示例。如果您正苦于以下问题:PHP AdministrationPage::addScriptToHead方法的具体用法?PHP AdministrationPage::addScriptToHead怎么用?PHP AdministrationPage::addScriptToHead使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdministrationPage
的用法示例。
在下文中一共展示了AdministrationPage::addScriptToHead方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build
public function build()
{
parent::build();
parent::addStylesheetToHead(URL . '/extensions/importcsv/assets/importcsv.css');
// parent::addStylesheetToHead(URL . '/symphony/assets/forms.css');
parent::addScriptToHead(URL . '/extensions/importcsv/assets/importcsv.js', 70);
$this->setTitle('Symphony - Import / export CSV');
$this->Context->appendChild(new XMLElement('h2', __('Import / Export CSV')));
}
示例2: build
public function build($context)
{
$this->_action = isset($context[0]) ? $context[0] : false;
if ($this->_action == 'edit' && isset($context[1]) && is_numeric($context[1])) {
// Load the data:
$this->_id_role = $context[1];
$this->_data = $this->_driver->getData($this->_id_role);
}
if (isset($_POST['save'])) {
// Save:
$this->_id_role = $this->_driver->saveData($_POST);
if ($this->_id_role != false) {
$this->_data = $this->_driver->getData($this->_id_role);
$this->pageAlert(__('Role successfully created/updated.'), Alert::SUCCESS);
} else {
$this->pageAlert(__('Role not saved: Please enter a name.'), Alert::ERROR);
}
}
parent::addStylesheetToHead(URL . '/extensions/author_roles/assets/author_roles.css', 'screen', 70);
parent::addScriptToHead(URL . '/extensions/author_roles/assets/author_roles.js', 71);
parent::build($context);
}