getData() public method

Get article type field data.
public getData ( string $field ) : mixed
$field string
return mixed
Example #1
0
 /**
  * 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);
 }