/** * Gets a data table for the model * @param string $formAction URL where the table form will point to * @return zibo\library\html\table\ExtendedTable */ protected function getTable($formAction) { $decorator = new AdvertisementDecorator($this->request->getBasePath() . '/' . self::ACTION_EDIT . '/'); $decorator = new ZebraDecorator($decorator); $table = parent::getTable($formAction); $table->addDecorator($decorator); return $table; }
/** * Constructs a new podcast manager * @return null */ public function __construct() { $translator = $this->getTranslator(); $isReadOnly = false; $search = array('title', 'teaser', 'text'); $order = array($translator->translate(self::TRANSLATION_DATE_PUBLICATION) => array('ASC' => '{datePublication} ASC', 'DESC' => '{datePublication} DESC'), $translator->translate(self::TRANSLATION_TITLE) => array('ASC' => '{title} ASC', 'DESC' => '{title} DESC')); parent::__construct(PodcastModel::NAME, PodcastWidget::TRANSLATION_NAME, PodcastWidget::ICON, $isReadOnly, $search, $order); $this->translationAdd = self::TRANSLATION_ADD; $this->translationOverview = PodcastWidget::TRANSLATION_NAME; $this->orderDirection = 'DESC'; }