2017 © Pedro Peláez
 

yii2-extension cm-entity

Common Entity Module for yii2

image

frenzelgmbh/cm-entity

Common Entity Module for yii2

  • Monday, June 9, 2014
  • by philippfrenzel
  • Repository
  • 1 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

cm-entity

Common Entity Module (Frenzel GmbH 2014) v.0.1, (*1)

Installation

Add the following line to your composer.json require section:, (*2)

"frenzelgmbh/cmentity":"*"
php yii migrate --migrationPath=@vendor/frenzelgmbh/cm-entity/migrations

Inside your yii-config, pls. add the following lines to your modules section. As you might see, the gridview needs to be implemented too., (*3)

'entity'=>[
  'class' => 'frenzelgmbh\cmentity\Module',
],
'gridview' =>  [
  'class' => '\kartik\grid\Module'
],

After this, you should be able to see the set of build in widgets and options under:, (*4)

http://yourhost/index.php?r=entity/default/test, (*5)

Design

The Entity module is use to store Entity/location informations, that can be linked to any other "module". So in general all modules are referenced by:, (*6)

  • mod_table (which should hold the table name VARCHAR(100))
  • mod_id (which should hold the primarey key of the referenced record INTEGER(11))

Our Entity Model is based upon an article of "flexible entity design patterns" and is focused on relations between entities while keeping each entity as a unique one., (*7)

Widgets

The "create"-Button:, (*8)

if(class_exists('\frenzelgmbh\cmentity\widgets\CreateEntityModal')){
  echo \frenzelgmbh\cmentity\widgets\CreateEntityModal::widget(array(
    'module'      => 'tbl_test',
    'id'          => 1
  )); 
}

The "related"-Grid:, (*9)

if(class_exists('\frenzelgmbh\cmentity\widgets\RelatedEntityGrid')){
  echo \frenzelgmbh\cmentity\widgets\RelatedEntityGrid::widget(array(
    'module'      => 'tbl_test',
    'id'          => 1
  )); 
}

The Versions

09/06 2014

dev-master

9999999-dev

Common Entity Module for yii2

  Sources   Download

GPL v2

The Requires

 

yii2 frenzel gmbh address module