/** * Get article switches * * @param Newscoop\Entity\Article $article * @return array */ public function getArticleSwitches($article) { $switches = array(); foreach ($this->switches as $switch) { try { if ($article->getData($switch)) { $switches[] = $switch; } } catch (\Exception $e) { /*just ignore if switch don't exists*/ } } }
public function getData($field) { $this->__load(); return parent::getData($field); }