public function getParent($permission) {
        $permission = $this->cast($permission);

        foreach ($this->toArray() as $element) {
            if (Permission::ENTITY === $element->getType() && 0 === strpos($permission->getValue(), $element->getValue())) {
                return $element;
            }
        }
    }
public function getParent($permission) {
        $permission = $this->cast($permission);

        foreach ($this->toArray() as $element) {
            if (Permission::ENTITY === $element->getType() && 0 === strpos($permission->getValue(), $element->getValue())) {
                return $element;
            }
        }
    }
public function getParent ( $ permission ) { $ permission = $ this -> cast ( $ permission ) ; foreach ( $ this -> toArray ( ) as $ element ) { if ( Permission :: ENTITY === $ element -> getType ( ) && 0 === strpos ( $ permission -> getValue ( ) , $ element -> getValue ( ) ) ) { return $ element ; } } }
Get parent permission

@param \Ds\Component\Acl\Model\Permission $permission
@return \Ds\Component\Acl\Model\Permission
Get parent permission