thefx / yii2-blocks
Blocks
Installs: 196
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.1.0
- 2amigos/yii2-transliterator-helper: *
- almasaeed2010/adminlte: ^3.1.0
- intervention/image: ^2.5
- la-haute-societe/yii2-save-relations-behavior: ^1.2
- paulzi/yii2-nested-sets: ^1.0
- select2/select2: >=4.0
- thefx/yii2-user: dev-master
- thefx/yii2-widgets-cropper: dev-master
- vova07/yii2-imperavi-widget: *
- yiisoft/yii2: ~2.0.5
- yiisoft/yii2-jui: ~2.0.0
Requires (Dev)
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2025-03-11 09:26:20 UTC
README
Installation
The preferred way to install this extension is through composer.
composer require thefx/yii2-blocks:dev-master
or add
"thefx/yii2-blocks": "dev-master"
to the require section of your composer.json
file.
Apply Migrations
php yii migrate --migrationPath=@thefx/blocks/migrations
Modify your application configuration:
return [
'modules' => [
'blocks' => [
'class' => 'thefx\blocks\Module',
'layoutPath' => '@app/modules/admin/layouts',
'layout' => 'page',
'layoutPure' => 'pure',
'rootUsers' => [1],
...
]
...
],
];
Add access only for auth users
'as access blocks' => [
'class' => 'yii\filters\AccessControl',
'only' => ['pages/*', 'blocks/*'],
'rules' => [
[
'allow' => true,
'roles' => ['@'],
],
],
],
Usage
Create block
http://site.com/blocks/block