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