コード例 #1
0
 public function add($type, $key, $settings = null, $pkg = null)
 {
     /**
      * @var $key Key
      */
     $key = parent::add($type, $key, $settings, $pkg);
     $key->setAttributeCategoryEntity($this->getCategoryEntity());
     $this->entityManager->persist($key);
     $this->entityManager->flush();
     return $key;
 }
コード例 #2
0
 public function addFromRequest(Type $type, Request $request)
 {
     $key = parent::addFromRequest($type, $request);
     /*
      * @var ExpressKey
      */
     $key->setEntity($this->expressEntity);
     return $key;
 }