2017 © Pedro Peláez
 

yii2-extension cm-categories

Common Address Module for yii2

image

frenzelgmbh/cm-categories

Common Address Module for yii2

  • Saturday, July 25, 2015
  • by philippfrenzel
  • Repository
  • 2 Watchers
  • 0 Stars
  • 50 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

cm-categories

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

Installation

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

"frenzelgmbh/cmcategories":"*"
php yii migrate --migrationPath=@vendor/frenzelgmbh/cm-categories/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)

'cmcategories'=>[
  'class' => 'frenzelgmbh\cmcategories\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=cmcategories/default/test, (*5)

Design

The Categories module is use to store categories, 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))

ATTENTION: be carefull with the order of the modules, that you register as the order is relevant for the connection to this module. Categories can be assigned to each module, that you configure within your app config., (*7)

Datastructure

This module allows you to store cmcategories data related to any other "record" and "module" you pass by as parameters. It allows you to save 1:n cmcategories records, while one record of cmcategories can be filled with the following fields: * Parent (self reference) * Name Pls. notice, that records aren't deleted in all of our models, they just get marked as deleted!, (*8)

Widgets

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

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

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

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

The Versions

25/07 2015

dev-master

9999999-dev

Common Address Module for yii2

  Sources   Download

GPL v2

yii2 frenzel gmbh address module