PHPackages                             quanzo/yii2-metafields - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. quanzo/yii2-metafields

ActiveLibrary

quanzo/yii2-metafields
======================

Universal fields and forms. Storage data to vertical table. Module for yii2

1.0.1(6y ago)01MITPHPPHP &gt;=7.0

Since Sep 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/quanzo/yii2-metafields)[ Packagist](https://packagist.org/packages/quanzo/yii2-metafields)[ RSS](/packages/quanzo-yii2-metafields/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

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

[](#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

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. Можно вставить в любое отображение одной строчкой кода.

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

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

Example config
--------------

[](#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.

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

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

\------------------------------------

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2435d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10706162?v=4)[quanzo](/maintainers/quanzo)[@quanzo](https://github.com/quanzo)

---

Top Contributors

[![quanzo](https://avatars.githubusercontent.com/u/10706162?v=4)](https://github.com/quanzo "quanzo (3 commits)")

---

Tags

yii2yii

### Embed Badge

![Health badge](/badges/quanzo-yii2-metafields/health.svg)

```
[![Health](https://phpackages.com/badges/quanzo-yii2-metafields/health.svg)](https://phpackages.com/packages/quanzo-yii2-metafields)
```

###  Alternatives

[brussens/yii2-maintenance-mode

Maintenance mode component for Yii framework 2.x.x version.

78256.3k5](/packages/brussens-yii2-maintenance-mode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
