Пример #1
0
 /**
  * Vrací data pro Grid
  *
  * @param IECfg $handledObejct objekt poskytující data
  * @param type $fallBackUrl
  */
 public function __construct($handledObejct, $fallBackUrl = null)
 {
     $this->handledObejct = $handledObejct;
     parent::__construct();
     $this->setBackUrl($fallBackUrl);
     $this->webPage = EaseShared::webPage();
     $this->title = $this->webPage->getRequestValue('title');
     if ($this->title) {
         $this->filename = preg_replace("/[^0-9^a-z^A-Z^_^.]/", "", str_replace(' ', '_', $this->title));
     }
     $cols = $this->webPage->getRequestValue('cols');
     if ($cols) {
         $col = explode('|', $cols);
         $names = $this->webPage->getRequestValue('names');
         $nam = explode('|', urldecode($names));
         $this->columns = array_combine($col, $nam);
     }
     $this->ajaxify();
 }
Пример #2
0
 /**
  * Objekt předvoleb
  */
 function __construct()
 {
     parent::__construct();
     $this->loadPrefs();
 }
Пример #3
0
 /**
  * Objekt konfigurace
  *
  * @param int|null $itemID
  */
 public function __construct($itemID = null)
 {
     if (!isset($_SESSION['parentCache'])) {
         //Todo: Zaktualizovat po editaci šablon
         $_SESSION['parentCache'] = array();
     }
     $this->parentCache =& $_SESSION['parentCache'];
     parent::__construct();
     $this->user = EaseShared::user();
     //       foreach ($this->useKeywords as $KeyWord => $ColumnType) {
     //            switch ($ColumnType) {
     //                case 'IDLIST':
     //                    $this->Listings[$KeyWord] = array();
     //                    break;
     //                default:
     //                    break;
     //            }
     //        }
     if (!is_null($itemID)) {
         if (is_string($itemID) && $this->nameColumn) {
             $this->setmyKeyColumn($this->nameColumn);
             $this->loadFromMySQL($itemID);
             $this->resetObjectIdentity();
         } else {
             $this->loadFromMySQL($itemID);
         }
     } else {
         // $this->setDataValue($this->userColumn, $this->user->getID());
     }
     if ($this->allowTemplating) {
         $this->useKeywords['name'] = 'VARCHAR(64)';
         $this->keywordsInfo['name'] = array('severity' => 'advanced', 'title' => _('Uložit jako předlohu pod jménem'));
         $this->useKeywords['register'] = 'BOOL';
         $this->useKeywords['use'] = 'SELECT';
         $this->keywordsInfo['register'] = array('severity' => 'advanced', 'title' => _('Není předloha'));
         $this->keywordsInfo['use'] = array('severity' => 'advanced', 'title' => 'použít předlohu - template', 'mandatory' => true, 'refdata' => array('table' => $this->myTable, 'captioncolumn' => 'name', 'idcolumn' => $this->myKeyColumn, 'condition' => array('register' => 0)));
     }
     if ($this->publicRecords) {
         $this->useKeywords['public'] = 'BOOL';
         $this->keywordsInfo['public'] = array('severity' => 'advanced', 'title' => 'Veřejně k dispozici ostatním', 'mandatory' => true);
         $this->keywordsInfo['use']['refdata']['public'] = true;
     }
     $this->keywordsInfo['user_id'] = array('severity' => 'advanced', 'title' => _('Vlastník'));
     $this->useKeywords['generate'] = 'BOOL';
     $this->keywordsInfo['generate'] = array('title' => 'Generovat do konfigurace', 'severity' => 'advanced', 'mandatory' => true);
     if (isset($this->userColumn)) {
         $this->useKeywords[$this->userColumn] = 'USER';
         $this->keywordsInfo[$this->userColumn] = array('severity' => 'advanced', 'title' => _('vlastník'), 'refdata' => array('table' => 'user', 'captioncolumn' => 'login', 'idcolumn' => 'user_id'));
     }
 }