src/Menu/MenuPermissionsFilter.php
public function buildPermissionsIndex(MenuLayoutDataInterface $layout)
    {
        $this->permissionsIndex = new PermissionsIndexData;
        $this->permissions      = [];

        $this->compileIndexForLayoutLayer($layout->layout());

        $this->permissions = array_unique($this->permissions);
        $this->permissionsIndex->permissions = $this->permissions;

        return $this->permissionsIndex;
    }
public function buildPermissionsIndex(MenuLayoutDataInterface $layout)
    {
        $this->permissionsIndex = new PermissionsIndexData;
        $this->permissions      = [];

        $this->compileIndexForLayoutLayer($layout->layout());

        $this->permissions = array_unique($this->permissions);
        $this->permissionsIndex->permissions = $this->permissions;

        return $this->permissionsIndex;
    }
public function buildPermissionsIndex ( MenuLayoutDataInterface $ layout ) { $ this -> permissionsIndex = new PermissionsIndexData ; $ this -> permissions = [ ] ; $ this -> compileIndexForLayoutLayer ( $ layout -> layout ( ) ) ; $ this -> permissions = array_unique ( $ this -> permissions ) ; $ this -> permissionsIndex -> permissions = $ this -> permissions ; return $ this -> permissionsIndex ; }
Builds permissions index data for a given layout.

The purpose of the index is to allow for efficient presence filtering
based on changing user permissions.

@param MenuLayoutDataInterface $layout
@return MenuPermissionsIndexDataInterface
Builds permissions index data for a given layout .