Download the PHP package quanzo/yii2-metafields without Composer

On this page you can find all versions of the php package quanzo/yii2-metafields. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-metafields

metafields модуль для Yii 2

The module allows you to bind data configured as an array to any identifier. Edit them in a form and save.

The form for editing or adding is specified in the module configuration. Implemented using pjax. You can insert into any display with one line of code.

Data is saved in a vertical table. The configuration of the fields is specified in the module settings. Used by https://github.com/quanzo/yii2-fields

Each data set is presented in the database in several rows. Each set has a specific id, which is set and defines the entire set of fields. As well as the type that is set during configuration.

------------------------------------

Модуль позволяет привязать данные, сконфигурированные в виде массива, к любому идентификатору. Редактировать их в форме и сохранять.

Форма для редактирования или добавления задается в конфигурации модуля. Реализована с использованием pjax. Можно вставить в любое отображение одной строчкой кода.

Данные сохраняются в вертикальную таблицу. Конфигурирование полей задается в настройках модуля. Используется https://github.com/quanzo/yii2-fields

Каждый набор данных представлен в БД несколькими строками. Каждый набор имеет определенный id, который задается и определяет весь набор полей. А также тип, который задается при конфигурировании.

 

Example config

'modules' => [
 'metafieldstest' => [
     'class' => 'x51\yii2\modules\metafields\Module',
     'type' => 'post',
     'fields' => [
         'title' => [
            'class' => '\x51\yii2\classes\fields\Input',
            'title' => 'Заголовок',
            'name' => 'name_field_title',
            'value' => 'Unknown',
            'options' => [
                'class' => 'form-control',
            ],
            'rules' => [
                ['required'],
            ],
        ],
        'desc' => [
            'class' => '\x51\yii2\classes\fields\Input',
            'title' => 'Пояснение',
            'name' => 'name_field_desc',
            'value' => 'Unknown',
            'options' => [
                'class' => 'form-control',
            ],
            'rules' => [
                ['required'],
            ],
        ],
        'multi' => [
            'class' => '\x51\yii2\classes\fields\MultipleInput',
            'title' => 'Multi',
            'name' => 'multi_field',
            'value' => ['Unknown', 'Unknown', 'Unknown'],
            'count' => 5,
            'options' => [
                'class' => 'form-control',
            ],
            'rules' => [
                ['required'],
            ],
        ],
        'content' => [
            'class' => '\x51\yii2\classes\fields\EditorjsInput',
            'title' => 'Это контент',
            'value' => '',
            'name' => 'content',
            'moduleEditorjs' => 'editorjs',
        ],
    ],
 ],

 

Параметры

type - задает тип записи. Используется при сохранении записей.

fields - конфигурация полей. Используется для сохранения в бд и для формирования формы. Каждое поле определяется классом.

 

Как использовать

$module = \Yii::$app->getModule('metafieldstest');
echo $module->form($tid);

where

\$tid - The unique identifier of the record within its type. For example, entries are tied to a specific “article”. The post type is set to “article”. The article has id = 100. Therefore, \$tid = 100.

The type of record is set in the module settings.

If the record exists, it will be edited and its contents will be displayed in the form.

------------------------------------

Уникальный идентификатор записи в рамках ее типа. Например, записи привязаны к определенной статье. Тип записи задан "article". Статья имеет id=100. Следовательно и \$tid = 100.

Тип записи задается в настройках модуля.

Если запись существует, то она будет редактироваться и в форме будет выведено ее содержимое.

------------------------------------

 

 


All versions of yii2-metafields with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
yiisoft/yii2 Version ~2.0.0
quanzo/yii2-fields Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package quanzo/yii2-metafields contains the following files

Loading the files please wait ....