PHP code example of simialbi / yii2-kanban

1. Go to this page and download the library: Download simialbi/yii2-kanban library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

simialbi / yii2-kanban example snippets


'modules' => [
    'kanban' => [
        'class' => 'simialbi\yii2\kanban\Module',
        //'statuses' => [],
        //'statusColors' => [],
        //'on boardCreated' => function ($event) {},
        //[...]
    ]
]

[
    'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationNamespaces' => [
                'simialbi\yii2\kanban\migrations'
            ]
        ]
    ]
]


use yii\db\ActiveRecord;
use simialbi\yii2\models\UserInterface;

class User extends ActiveRecord implements UserInterface
{
    /**
     * {@inheritDoc}
     */
    public static function tableName()
    {
        return 'user';
    }

    /**
     * {@inheritDoc}
     */
    public static function findIdentity($id)
    {
        return static::findOne($id);
    }

    /**
     * {@inheritDoc}
     */
    public static function findIdentityByAccessToken($token, $type = null)
    {
        return static::findOne(['access_token' => $token]);
    }

    /**
     * {@inheritDoc}
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * {@inheritDoc}
     */
    public function getAuthKey()
    {
        return $this->auth_key;
    }

    /**
     * {@inheritDoc}
     */
    public function validateAuthKey($authKey)
    {
        return $this->getAuthKey() === $authKey;
    }

    /**
     * {@inheritDoc}
     */
    public function getImage() {
        return $this->image;
    }

    /**
     * {@inheritDoc}
     */
    public function getName() {
        return trim($this->first_name . ' ' . $this->last_name);
    }

    /**
     * {@inheritDoc}
     */
    public function getEmail() {
        return $this->email;
    }

    /**
     * {@inheritDoc}
     */
    public function getMobile() {
        return $this->mobile;
    }

    /**
     * {@inheritDoc}
     */
    public static function findIdentities() {
        return static::find()->all();
    }
}

'components' => [
    'user' => [
        'identityClass' => 'app\models\User'
    ]
]

'components' => [
    'assetManager' => [
        'bundles' => [
            'yii\jui\JuiAsset' => [
                'css' => [],
                'js' => [
                    'ui/data.js',
                    'ui/scroll-parent.js',
                    'ui/widget.js',
                    'ui/widgets/mouse.js',
                    'ui/widgets/sortable.js',
                ],
                'publishOptions' => [
                    'only' => [
                        'ui/*',
                        'ui/widgets/*'
                    ]
                ]
            ]
        ]
    ]
]

$ php composer.phar