public function setStatus($status) { if (!array_key_exists($status, ArticleStatus::getOptions())) { throw new Exceptions\InvalidArgumentException("ArticleStatus out of range"); } $this->status = $status; }
public function getStates() { return ArticleStatus::getOptions(); }
/** * Grid column render. * @param Article $e * @return string */ public function statusRender($e) { return $this->tt(ArticleStatus::getOptions()[$e->getStatus()]); }