コード例 #1
0
 public function __construct(array $options = array())
 {
     if (isset($options['db'])) {
         $this->_db = $options['db'];
     }
     parent::__construct($options);
 }
コード例 #2
0
 public function update(Kwf_Model_Row_Interface $row, $rowData)
 {
     parent::update($row, $rowData);
     $rowData['row']->visible = $row->visible;
     $rowData['row']->name = $row->name;
     $rowData['row']->save();
 }
コード例 #3
0
 public function __construct(array $config = array())
 {
     if (isset($config['fieldName'])) {
         $this->_fieldName = $config['fieldName'];
     }
     parent::__construct($config);
 }
コード例 #4
0
 public function update(Kwf_Model_Row_Interface $row, $rowData)
 {
     parent::update($row, $rowData);
     foreach ($this->_translateFields as $tf) {
         $rowData['row']->{$tf} = $row->{$tf};
     }
     $rowData['row']->save();
 }
コード例 #5
0
 protected function _init()
 {
     $this->_data = array();
     foreach ($this->_domains as $key => $val) {
         $pattern = isset($val['pattern']) ? $val['pattern'] : null;
         $this->_data[] = array('id' => $key, 'name' => isset($val['name']) ? $val['name'] : $key, 'domain' => $val['domain'], 'component' => $key, 'pattern' => $pattern);
     }
     parent::_init();
 }
コード例 #6
0
ファイル: FnF.php プロジェクト: xiaoguizhidao/koala-framework
 public function __construct(array $config = array())
 {
     if (isset($config['uniqueIdentifier'])) {
         $this->_uniqueIdentifier = $config['uniqueIdentifier'];
     }
     if (!isset($config['columns']) && isset($config['data'][0])) {
         $config['columns'] = array_keys($config['data'][0]);
     }
     parent::__construct($config);
 }
コード例 #7
0
 protected function _init()
 {
     $this->_data = array();
     if ($this->_pageCategories) {
         foreach ($this->_pageCategories as $key => $val) {
             $this->_data[] = array('id' => $key, 'name' => $val, 'component' => $key);
         }
     }
     parent::_init();
 }
コード例 #8
0
 public function __construct(array $config = array())
 {
     if (isset($config['namespace'])) {
         $this->_namespace = $config['namespace'];
     }
     if (isset($config['defaultData'])) {
         $this->_defaultData = $config['defaultData'];
     }
     parent::__construct($config);
 }
コード例 #9
0
 public function __construct(array $config = array())
 {
     $data = array();
     $components = Kwf_Component_Data_Root::getInstance()->getComponentsByClass(array('Kwc_Editable_Component', 'Kwc_Editable_Trl_Component'), array('ignoreVisible' => true));
     $user = Kwf_Registry::get('userModel')->getAuthedUser();
     foreach ($components as $c) {
         if (Kwf_Registry::get('acl')->getComponentAcl()->isAllowed($user, $c)) {
             $data[] = array('id' => $c->dbId, 'name' => $c->getComponent()->getNameForEdit(), 'content_component_class' => $c->getChildComponent('-content')->componentClass);
         }
     }
     $this->_data = $data;
     parent::__construct($config);
 }
コード例 #10
0
 public function update(Kwf_Model_Row_Interface $row, $rowData)
 {
     parent::update($row, $rowData);
     if ($row->text && $row->text != $row->original_text) {
         $model = Kwf_Model_Abstract::getInstance('Kwf_Component_Generator_Plugin_Tags_Trl_Model');
         $trlRow = $model->getRow($row->id);
         if (!$trlRow) {
             $trlRow = $model->createRow(array('id' => $row->id));
         }
         $trlRow->text = $row->text;
         $trlRow->save();
     }
 }
コード例 #11
0
ファイル: Xml.php プロジェクト: xiaoguizhidao/koala-framework
 public function __construct(array $config = array())
 {
     if (isset($config['filepath'])) {
         $this->_filepath = $config['filepath'];
     }
     if (isset($config['xmlContent'])) {
         $this->_xmlContent = $config['xmlContent'];
     }
     if (isset($config['xpath'])) {
         $this->_xpath = $config['xpath'];
     }
     if (isset($config['topNode'])) {
         $this->_topNode = $config['topNode'];
     }
     if (isset($config['rootNode'])) {
         $this->_rootNode = $config['rootNode'];
     }
     parent::__construct($config);
 }
コード例 #12
0
 public function childModelRowUpdated(Kwf_Model_Row_Abstract $row, $action)
 {
     parent::childModelRowUpdated($row, $action);
     $models = array($this);
     $models = array_merge($models, $this->_proxyContainerModels);
     foreach ($models as $model) {
         foreach ($model->_exprs as $column => $expr) {
             if ($expr instanceof Kwf_Model_Select_Expr_Child) {
                 if ($model->getDependentModel($expr->getChild()) === $row->getModel()) {
                     $rule = $row->getModel()->getReferenceRuleByModelClass(get_class($model));
                     $parentRow = $row->getParentRow($rule);
                     $parentRow->{$column} = $model->getExprValue($parentRow, $expr);
                     $parentRow->save();
                 }
             }
         }
     }
 }
コード例 #13
0
 public function delete(Kwf_Model_Row_Interface $row)
 {
     parent::delete($row);
     $this->getDb()->query("DROP TABLE {$row->table}");
 }