コード例 #1
0
ファイル: Grid.php プロジェクト: codegooglecom/torpor-php
 protected function _setLoaded($bool = true)
 {
     if (!$bool) {
         $this->_setKeyHash(false);
     }
     return parent::_setLoaded($bool);
 }
コード例 #2
0
ファイル: GridSet.php プロジェクト: codegooglecom/torpor-php
 public function GridSet(Torpor $torpor, $gridType = null, $sourceContent = null, $sourceGridAlias = null)
 {
     parent::__construct($torpor);
     if (!empty($gridType)) {
         $this->setType($gridType);
     }
     if (!empty($sourceContent)) {
         if ($sourceContent instanceof Grid) {
             $this->setSourceGrid($sourceContent, $sourceGridAlias);
         } else {
             if ($sourceContent instanceof Criteria) {
                 $this->setSourceCriteria($sourceContent);
             }
         }
     }
     $this->setPageSize($this->Torpor()->pageSize());
 }
コード例 #3
0
ファイル: Column.php プロジェクト: codegooglecom/torpor-php
 protected function _setDirty($bool = true)
 {
     $bool = $bool ? true : false;
     parent::_setDirty($bool);
     if ($bool) {
         $this->Grid()->dirtyColumn();
     }
     return $bool;
 }
コード例 #4
0
ファイル: Torpor.php プロジェクト: codegooglecom/torpor-php
 public function Load(PersistableContainer $grid, $refresh = false)
 {
     if (!is_object($this->ReadDataStore())) {
         $this->throwException('No read data store defined, cannot load grid ' . $grid->_getObjName());
     }
     if ($grid instanceof Grid) {
         return $this->ReadDataStore()->Load($grid, $refresh);
     } else {
         if ($grid instanceof GridSet) {
             return $this->ReadDataStore()->LoadSet($grid, $refresh);
         } else {
             $this->throwException('Cannot load object of type ' . gettype($grid) . (is_object($grid) ? '(' . get_class($grid) . ')' : '') . ', don\'t know how to handle it');
         }
     }
 }