コード例 #1
0
ファイル: IndexPage.php プロジェクト: gudwin/extasy
 public function __construct()
 {
     $doc = DBSimple::get(IndexPageModel::TableName, '');
     $doc = new IndexPageModel($doc);
     $this->sitemapInfo = $doc->getSiteMapData();
     $this->title = self::title;
     $this->begin = array(self::title => '#');
     $this->parent = intval($this->sitemapInfo['id']);
     $this->paging_size = self::pagingSize;
     parent::__construct();
 }
コード例 #2
0
ファイル: order.php プロジェクト: gudwin/extasy
 /**
  *   -------------------------------------------------------------------------------------------
  * @desc Сохраняет отсортированные данные
  * @return
  *   -------------------------------------------------------------------------------------------
  */
 public function order()
 {
     $typeName = $_POST['type'];
     $validator = new \Extasy\Validators\IsModelClassNameValidator($typeName);
     if (!$validator->isValid()) {
         throw new InvalidArgumentException('Not a model - ' . $typeName);
     }
     $aType = call_user_func([$typeName, 'getFieldsInfo']);
     $szIndex = call_user_func([$typeName, 'getIndexKey']);
     $i = 1;
     $aRows = explode("\n", $_POST['order_value']);
     unset($aRows[0]);
     foreach ($aRows as $value) {
         \Extasy\ORM\DBSimple::update($aType['table'], ['order' => $i], [$szIndex => $value]);
         $i++;
     }
     $this->afterOrder();
     $this->jump($this->jump_to);
 }
コード例 #3
0
ファイル: SectionIndex.php プロジェクト: gudwin/extasy
 protected function seekIndexDocument()
 {
     $found = DBSimple::get(SITEMAP_TABLE, ['document_name' => $this->modelName]);
     return $found;
 }