Esempio n. 1
0
 public function __construct($obj = array())
 {
     // attributes
     $this->linkedPage = isset($obj['linkedPage']) ? $obj['linkedPage'] : NULL;
     $this->extraArgs = isset($obj['extraArgs']) ? $obj['extraArgs'] : NULL;
     parent::__construct($obj);
 }
Esempio n. 2
0
 public function __construct($meta = array())
 {
     // attributes
     $this->query = safe_attr($meta, 'query', array());
     $this->paginate = safe_attr($meta, 'paginate');
     $this->enableSearchBox = safe_attr($meta, 'enableSearchBox');
     $this->showNavCreate = safe_attr($meta, 'showNavCreate');
     $this->csvExport = safe_attr($meta, 'csvExport');
     $this->whenEmpty = safe_attr($meta, 'whenEmpty');
     $this->emptyMessage = safe_attr($meta, 'emptyMessage');
     $this->templateFile = safe_attr($meta, 'templateFile');
     $this->sqlCols = safe_attr($meta, 'sqlCols');
     // columns
     $this->columns = array();
     // clear current data
     if (isset($meta['columns'])) {
         foreach ((array) $meta['columns'] as $col) {
             $this->columns[] = new Column($col);
         }
     }
     // legacy attributes
     if (isset($meta['sql_cols']) && !isset($this->sqlCols)) {
         $this->sqlCols = $meta['sql_cols'];
     }
     // class object attrs
     $this->nav = new Navbar();
     parent::__construct($meta);
 }
Esempio n. 3
0
 public function __construct($meta = array())
 {
     // attributes
     $this->method = isset($meta['method']) ? $meta['method'] : 'POST';
     // onLoad
     $this->onLoad = array();
     if (isset($meta['onLoad'])) {
         foreach ($meta['onLoad'] as $cmd) {
             $this->onLoad[] = new Command($cmd);
         }
     }
     // fields
     $this->fields = array();
     // clear current data
     if (isset($meta['fields'])) {
         foreach ((array) $meta['fields'] as $field) {
             $name = isset($field['name']) && strlen($field['name']) > 0 ? $field['name'] : 'fld_' . rand();
             // set random name for fields with no ID (eg. buttons)
             switch ($field['type']) {
                 case 'file':
                     $this->fields[$name] = new \Meta\Builder\Field\File($field);
                 default:
                     $this->fields[$name] = new Field($field);
                     break;
             }
         }
     }
     parent::__construct($meta);
 }
Esempio n. 4
0
 public function __construct($meta = array())
 {
     // commands
     $this->commands = array();
     if (isset($meta['commands'])) {
         foreach ($meta['commands'] as $cmd) {
             $this->commands[] = new Command($cmd);
         }
     }
     parent::__construct($meta);
 }