2017 © Pedro Peláez
 

yii2-extension yii2-related-entities

relatedentities

image

zlakomanoff/yii2-related-entities

relatedentities

  • Friday, May 25, 2018
  • by zlakomanoff
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

relatedentities

relatedentities, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist zlakomanoff/yii2-related-entities "*"

or add, (*4)

"zlakomanoff/yii2-related-entities": "*"

to the require section of your composer.json file., (*5)

Usage

view, (*6)



or

 'zlakomanoff\relatedentities\RelatedEntitiesActiveField'
]); ?>

= $form->field($model, 'videos')->relation('//videos/_form_related') ?>

model, (*7)

class MyRecord extends \zlakomanoff\relatedentities\RelatedActiveRecord
{

    public function rules()
    {
        return [
            [['field1', 'field2'], 'relation']
        ];
    }

    public function getField1()
    {
        return $this->hasMany(MyField1::class, ['id' => 'field1_id']);
    }

    public function getField2()
    {
        return $this->hasMany(MyField2::class, ['id' => 'field2_id']);
    }

}

The Versions

25/05 2018

dev-master

9999999-dev

relatedentities

  Sources   Download

GPL-3.0+

The Requires

 

by Zlakomanov Alexander

extension yii2

16/05 2018

v0.1

0.1.0.0

relatedentities

  Sources   Download

GPL-3.0+

The Requires

 

by Zlakomanov Alexander

extension yii2