private function getParentModules(): array
    {
        if (! isset($this->capabilities['action'][Utils::getTypeParent()])) {
            return [];
        }

        $result = [];
        foreach ($this->capabilities['action'][Utils::getTypeParent()] as $capability) {
            if (in_array($capability->getName(), $this->capabilities['user'])) {
                $result = $capability->getParentModules();
            }
        }

        return $result;
    }
private function getParentModules(): array
    {
        if (! isset($this->capabilities['action'][Utils::getTypeParent()])) {
            return [];
        }

        $result = [];
        foreach ($this->capabilities['action'][Utils::getTypeParent()] as $capability) {
            if (in_array($capability->getName(), $this->capabilities['user'])) {
                $result = $capability->getParentModules();
            }
        }

        return $result;
    }
private function getParentModules ( ) : array { if ( ! isset ( $ this -> capabilities [ 'action' ] [ Utils :: getTypeParent ( ) ] ) ) { return [ ] ; } $ result = [ ] ; foreach ( $ this -> capabilities [ 'action' ] [ Utils :: getTypeParent ( ) ] as $ capability ) { if ( in_array ( $ capability -> getName ( ) , $ this -> capabilities [ 'user' ] ) ) { $ result = $ capability -> getParentModules ( ) ; } } return $ result ; }
Parent modules getter.

Returns the list of parent modules based on current action parent capabilities,
filtered by current user capabilities.

@return mixed[]
Parent modules getter .