Acl\Shell\AclShell::_dataVars PHP Méthode

_dataVars() protected méthode

Build data parameters based on node type
protected _dataVars ( string $type = null ) : array
$type string Node type (ARO/ACO)
Résultat array Variables
    protected function _dataVars($type = null)
    {
        if (!$type) {
            $type = $this->args[0];
        }
        $vars = [];
        $class = ucwords($type);
        $vars['secondary_id'] = strtolower($class) === 'aro' ? 'foreign_key' : 'object_id';
        $vars['data_name'] = $type;
        $vars['table_name'] = $type . 's';
        $vars['class'] = $class;
        return $vars;
    }