Esempio n. 1
0
 /**
  * Transform a given model entry into an ACL related Entry (ACE).
  *
  * @param \Propel\Bundle\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);
 }
Esempio n. 2
0
 /**
  * Constructor.
  *
  * @param \Propel\Bundle\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);
 }