2017 © Pedro Peláez
 

yii2-extension yii2-timeline-widget

A widget to render simple timeline

image

mice-tm/yii2-timeline-widget

A widget to render simple timeline

  • Friday, December 1, 2017
  • by mice-tm
  • Repository
  • 0 Watchers
  • 0 Stars
  • 679 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 44 % Grown

The README.md

Yii2 TimeLine Widget

Latest Version License: MIT Dependency Status Scrutinizer Code Quality Build Status Total Downloads, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist mice-tm/yii2-timeline-widget "*"

or add, (*4)

"mice-tm/yii2-timeline-widget": "*"

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

Usage

Timeline widget expects array of LogModel-like models (micetm\timeline\LogModel) in items-param. Where title and body can contain macros strings in yii macros-format {here-is-macros}. With eventIcons-param you can extend or reassign icons for actions., (*6)

class LogModel extends Model
{

    public $action;
    public $title,
    public $body;
    public $log_date;
    public $macros;
    public $_id;

    public function rules()
    {
        return [
            [['action', 'title'], 'required'],
            [['action', 'title', 'body'], 'string'],
            ['log_date', 'integer'],
            ['macros', 'safe']
        ];
    }

    public function attributes()
    {
        return [
            '_id',
            'action',
            'title',
            'body',
            'macros',
            'log_date',
        ];
    }

    public function attributeLabels()
    {
        return [
            '_id' => '#',
            'action' => 'Action',
            'macros' => 'Macros',
            'title' => 'Title',
            'body' => 'Body',
            'log_date' => 'Date',
        ];
    }
}

Once the extension is installed, simply use it in your code by :, (*7)

 $dataProvider->getModels(),
    'eventIcons' => [
        'update' => 'fa fa-pencil bg-orange',
        'add' => 'fa fa-pencil bg-orange',
        'create' => 'glyphicon glyphicon-star bg-green',
    ]
]); ?>

The Versions

01/12 2017

dev-master

9999999-dev

A widget to render simple timeline

  Sources   Download

MIT

The Requires

 

by Iryna Mychkova

extension yii2 widget timeline

01/12 2017

1.0.0

1.0.0.0

A widget to render simple timeline

  Sources   Download

MIT

The Requires

 

by Iryna Mychkova

extension yii2 widget timeline