/**
  * @see Newscoop\Service\Implementation\ArticleTypeServiceDoctrine::createField()
  */
 private function _createField($name, ArticleType $type, $props = null)
 {
     Validation::notEmpty($name, 'name');
     $artField = new ArticleTypeField();
     // TODO hack hack hack
     $artField->setArticleType($type)->setArticleTypeHack($type)->setName($name);
     if (is_array($props)) {
         foreach ($props as $prop => $val) {
             $setProp = "set" . ucfirst($prop);
             $artField->{$setProp}($val);
         }
     }
     $em = $this->getEntityManager();
     $em->persist($artField);
     return $artField;
 }
 public function setType($val)
 {
     $this->__load();
     return parent::setType($val);
 }