public function build($context)
 {
     if (!empty($this->_errors)) {
         $this->_valid = false;
     }
     parent::build($context);
 }
 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);
 }
 public function build($context)
 {
     if (@$context[0] == 'show') {
         $this->_log = (object) $this->_driver->getLog($context[1]);
     } else {
         $this->__prepareIndex();
     }
     parent::build($context);
 }
 public function build($context)
 {
     if (@$context[0] == 'edit' or @$context[0] == 'new') {
         $this->__prepareEdit($context);
     } else {
         $this->__prepareIndex();
     }
     parent::build($context);
 }
示例#5
0
 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')));
 }
 /**
  * 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);
     }
 }
 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
0
 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);
 }
		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);
		}
 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);
 }
 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);
 }
 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
0
 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);
 }
 public function build(array $context = array())
 {
     $this->__setContext((int) $_GET['section']);
     parent::build($context);
 }
 public function build($context)
 {
     $this->mode = $context[0];
     $this->id = $context[1];
     parent::build($context);
 }
 public function build()
 {
     parent::build();
     $this->setTitle('Symphony - DIM Configuration');
 }
 public function build(array $context = array())
 {
     $section_id = SectionManager::fetchIDFromHandle($context['section_handle']);
     if ($section_id) {
         $context['associations'] = array('parent' => SectionManager::fetchParentAssociations($section_id), 'child' => SectionManager::fetchChildAssociations($section_id));
     }
     return parent::build($context);
 }
 public function build($context)
 {
     $this->__prepareEdit($context);
     parent::build($context);
 }
 public function build(array $context = array())
 {
     $this->__prepareEdit($context);
     parent::build($context);
 }
 public function build()
 {
     parent::build();
 }
示例#21
0
 public function build($context)
 {
     $this->context = $context;
     parent::build($context);
 }
 public function build()
 {
     parent::build();
     $this->setTitle('Symphony - Database Log');
 }
 public function build($context)
 {
     if (isset($context[0]) and ($context[0] == 'edit' or $context[0] == 'new')) {
         $context[0] = 'form';
     }
     parent::build($context);
 }