本文整理汇总了PHP中AdministrationPage::build方法的典型用法代码示例。如果您正苦于以下问题:PHP AdministrationPage::build方法的具体用法?PHP AdministrationPage::build怎么用?PHP AdministrationPage::build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdministrationPage
的用法示例。
在下文中一共展示了AdministrationPage::build方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build
public function build($context)
{
if (!empty($this->_errors)) {
$this->_valid = false;
}
parent::build($context);
}
示例2: build
public function build(array $context = array())
{
$section_id = $context[1];
if (isset($section_id)) {
$context['associations'] = array('parent' => SectionManager::fetchParentAssociations($section_id), 'child' => SectionManager::fetchChildAssociations($section_id));
}
return parent::build($context);
}
示例3: build
public function build($context)
{
if (@$context[0] == 'show') {
$this->_log = (object) $this->_driver->getLog($context[1]);
} else {
$this->__prepareIndex();
}
parent::build($context);
}
示例4: build
public function build($context)
{
if (@$context[0] == 'edit' or @$context[0] == 'new') {
$this->__prepareEdit($context);
} else {
$this->__prepareIndex();
}
parent::build($context);
}
示例5: 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')));
}
示例6: build
/**
* Build the page
* @param array $context
*/
public function build($context)
{
if (Administration::instance()->Author()->isDeveloper()) {
if ($_POST['with-selected'] == 'delete' && is_array($_POST['items'])) {
foreach ($_POST['items'] as $id_role => $value) {
$this->_driver->deleteRole($id_role);
}
}
parent::build($context);
}
}
示例7: build
public function build($context)
{
if (@$context[0] == 'edit' or @$context[0] == 'new') {
if ($this->_editing = $context[0] == 'edit') {
$this->_fields = $this->_driver->getFormatter($context[1]);
}
$this->_handle = $context[1];
$this->_status = $context[2];
} else {
$this->__prepareIndex();
}
parent::build($context);
}
示例8: build
public function build($context)
{
if (@$context[0] == 'edit' or @$context[0] == 'new') {
if ($this->_editing = $context[0] == 'edit') {
$this->_fields = $this->_driver->getRule((int) $context[1]);
}
$this->_fields = isset($_POST['fields']) ? $_POST['fields'] : $this->_fields;
$this->_status = $context[2];
$this->_sections = $this->_driver->getSections();
} else {
$this->_rules = $this->_driver->getRules();
}
parent::build($context);
}
示例9: build
public function build($context) {
if (@$context[0] == 'edit' or @$context[0] == 'new') {
$this->_editing = $context[0] == 'edit';
$this->_status = $context[2];
if ($this->_editing) {
$this->_fields = $this->_driver->getRule($context[1]);
}
} else {
$this->__prepareIndex();
}
parent::build($context);
}
示例10: build
public function build($context)
{
if (isset($context[0])) {
if ($context[0] == 'edit' || $context[0] == 'new') {
$this->__prepareEdit($context);
} else {
if ($context[0] == 'run') {
$this->__prepareRun($context);
}
}
} else {
$this->__prepareIndex();
}
parent::build($context);
}
示例11: build
public function build($context)
{
if (@$context[0] == 'edit' or @$context[0] == 'new') {
if ($this->_editing = $context[0] == 'edit') {
$this->_fields = $this->_driver->getSet((int) $context[1]);
$this->_params = $this->_driver->getParameters((int) $context[1]);
}
$this->_fields = isset($_POST['fields']) ? $_POST['fields'] : $this->_fields;
$this->_params = isset($_POST['params']) ? $_POST['params'] : $this->_params;
$this->_status = $context[2];
$this->_pages = $this->_driver->getPages();
} else {
$this->_sets = $this->_driver->getSets();
}
parent::build($context);
}
示例12: build
public function build($context)
{
if (@$context[0] == 'edit' or @$context[0] == 'new') {
if ($this->_editing = $context[0] == 'edit') {
$this->_fields = $this->_driver->getTemplate((int) $context[1]);
$this->_conditions = $this->_driver->getConditions((int) $context[1]);
}
$this->_fields = isset($_POST['fields']) ? $_POST['fields'] : $this->_fields;
$this->_conditions = isset($_POST['conditions']) ? $_POST['conditions'] : $this->_conditions;
$this->_status = $context[2];
$this->_pages = $this->_driver->getPages();
} else {
$this->_templates = $this->_driver->getTemplates();
}
parent::build($context);
}
示例13: 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);
}
示例14: build
public function build(array $context = array())
{
$this->__setContext((int) $_GET['section']);
parent::build($context);
}
示例15: build
public function build($context)
{
$this->mode = $context[0];
$this->id = $context[1];
parent::build($context);
}