2017 © Pedro Peláez
 

yii2-extension yii2-blog

Blog module for Yii2

image

nullref/yii2-blog

Blog module for Yii2

  • Saturday, July 21, 2018
  • by ZAYEC77
  • Repository
  • 6 Watchers
  • 0 Stars
  • 259 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Blog module for Yii2

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist nullref/yii2-blog "*"

or add, (*4)

"nullref/yii2-blog": "*"

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

Override classes

You can override classes by module config., (*6)

'blog' => [
    'class' => "nullref\\blog\\Module",  
    'classMap'=>[
        'Post' => 'app\models\Post',
        'PostSearch' => 'nullref\app\PostSearch',
        'PostQuery' => 'app\models\PostQuery',
        'BlogStatusList' => 'app\components\BlogStatusList',
    ],
],

Add custom statuses

When you override BlogStatusList class, you can add custom statuses for blog posts. Example:, (*7)


namespace app\components; class BlogStatusList extends \nullref\blog\components\BlogStatusList { const STATUS_HIDE = 3; public function getList() { return array_merge(parent::getList(),[ self::STATUS_HIDE => \Yii::t('app','Hide'), ]); } }

The Versions

21/07 2018
22/04 2018
05/10 2016

v0.0.1

0.0.1.0

Blog module for Yii2

  Sources   Download

MIT

The Requires

 

by Vitaly Zaremba

extension yii2 blog