Evercode1\ViewMaker\FormatsTokens::formatTokens PHP Метод

formatTokens() публичный Метод

public formatTokens ( $content )
    public function formatTokens($content)
    {
        $upperCaseModelName = ucfirst($this->modelName);
        $field_name = snake_case($this->modelName) . '_name';
        $modelId = $this->formatInstanceVariable() . '->id';
        $modelAttribute = $this->formatInstanceVariable() . '->' . $field_name;
        $createdAt = $this->formatInstanceVariable() . '->created_at';
        $modelRoute = '/' . $this->folderName;
        $dtTableName = snake_case($this->modelName) . '_table';
        $masterPage = $this->masterPage;
        $modelName = $this->modelName;
        $modelsUpperCase = ucwords(str_plural($this->modelName));
        $folderName = $this->folderName;
        $gridName = $this->formatVueGridName() . '-grid';
        $endGridName = '/' . $this->formatVueGridName() . '-grid';
        $vueApiRoute = 'api/' . $this->folderName . '-vue';
        $parent = $this->parent;
        $parentInstance = $this->formatParentInstanceVariable($this->parent);
        $parentInstances = $this->formatParents($this->parent);
        $parent_id = strtolower(snake_case($this->parent)) . '_id';
        $parentFieldName = strtolower(snake_case($this->parent)) . '_name';
        $child = $this->child;
        $slug = $this->slug;
        //create token array using compact
        $tokens = compact('upperCaseModelName', 'field_name', 'modelId', 'modelAttribute', 'createdAt', 'modelRoute', 'dtTableName', 'masterPage', 'modelName', 'modelsUpperCase', 'folderName', 'gridName', 'endGridName', 'vueApiRoute', 'parent', 'parentInstance', 'parentInstances', 'parent_id', 'parentFieldName', 'child', 'slug');
        $content = $this->insertTokensInContent($content, $tokens);
        return $content;
    }