protected static function generateParentCapabilities(Table $table, string $contrName, array $actions): array
    {
        $result = [];

        if (empty($contrName) || empty($actions)) {
            return $result;
        }

        $parentModules = static::getTableParentModules($table);
        if (empty($parentModules)) {
            return $result;
        }

        $name = static::generateCapabilityName($contrName, 'fetch_parent');
        $options = [
            'label' => static::generateCapabilityLabel($contrName, 'fetch_parent'),
            'description' => static::generateCapabilityDescription(
                $contrName,
                'fetch if owner on parent module (' . implode(', ', $parentModules) . ')'
            ),
            'parent_modules' => $parentModules
        ];

        $result[] = new Cap($name, $options);

        return $result;
    }
protected static function generateParentCapabilities(Table $table, string $contrName, array $actions): array
    {
        $result = [];

        if (empty($contrName) || empty($actions)) {
            return $result;
        }

        $parentModules = static::getTableParentModules($table);
        if (empty($parentModules)) {
            return $result;
        }

        $name = static::generateCapabilityName($contrName, 'fetch_parent');
        $options = [
            'label' => static::generateCapabilityLabel($contrName, 'fetch_parent'),
            'description' => static::generateCapabilityDescription(
                $contrName,
                'fetch if owner on parent module (' . implode(', ', $parentModules) . ')'
            ),
            'parent_modules' => $parentModules
        ];

        $result[] = new Cap($name, $options);

        return $result;
    }
protected static function generateParentCapabilities ( Table $ table , string $ contrName , array $ actions ) : array { $ result = [ ] ; if ( empty ( $ contrName ) || empty ( $ actions ) ) { return $ result ; } $ parentModules = static :: getTableParentModules ( $ table ) ; if ( empty ( $ parentModules ) ) { return $ result ; } $ name = static :: generateCapabilityName ( $ contrName , 'fetch_parent' ) ; $ options = [ 'label' => static :: generateCapabilityLabel ( $ contrName , 'fetch_parent' ) , 'description' => static :: generateCapabilityDescription ( $ contrName , 'fetch if owner on parent module (' . implode ( ', ' , $ parentModules ) . ')' ) , 'parent_modules' => $ parentModules ] ; $ result [ ] = new Cap ( $ name , $ options ) ; return $ result ; }
Generate controller parent capabilities.

@param \Cake\ORM\Table $table Table instance
@param string $contrName Controller name
@param mixed[] $actions Controller actions
@return mixed[]
Generate controller parent capabilities .