예제 #1
0
 /**
  * Transform a given model entry into an ACL related Entry (ACE).
  *
  * @param \Propel\PropelBundle\Model\Acl\Entry $modelEntry
  * @param \Symfony\Component\Security\Acl\Model\AclInterface $acl
  *
  * @return \Symfony\Component\Security\Acl\Model\EntryInterface
  */
 public static function toAclEntry(Entry $modelEntry, AclInterface $acl)
 {
     if (null === $modelEntry->getFieldName()) {
         return new AclEntry($modelEntry, $acl);
     }
     return new AclFieldEntry($modelEntry, $acl);
 }
예제 #2
0
 /**
  * Constructor.
  *
  * @param \Propel\PropelBundle\Model\Acl\Entry               $entry
  * @param \Symfony\Component\Security\Acl\Model\AclInterface $acl
  */
 public function __construct(ModelEntry $entry, AclInterface $acl)
 {
     $this->field = $entry->getFieldName();
     parent::__construct($entry, $acl);
 }