/** * 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); }
/** * 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); }