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