/** * (non-PHPdoc) * @see \tfc\mvc\Widget::run() */ public function run() { $typeKey = isset($this->type_key) ? trim($this->type_key) : ''; if ($typeKey === '') { return; } $row = Helper::getRow($typeKey); $isShow = false; if ($row && is_array($row) && isset($row['show_code'])) { $isShow = true; } $this->assign('is_show', $isShow); $this->assign($row); $this->display(); }
/** * (non-PHPdoc) * @see \tfc\mvc\Widget::run() */ public function run() { $typeKey = isset($this->type_key) ? trim($this->type_key) : ''; if ($typeKey === '') { return; } $typeName = Types::getTypeNameByTypeKey($typeKey); if ($typeName === '') { return; } $limit = isset($this->limit) ? (int) $this->limit : 0; $offset = isset($this->offset) ? (int) $this->offset : 0; $rows = Helper::findRows($typeKey, $limit, $offset); $isShow = false; if ($rows && is_array($rows)) { $isShow = true; } $this->assign('is_show', $isShow); $this->assign('type_name', $typeName); $this->assign('rows', $rows); $this->display(); }