qobo / cakephp-utils
该包已被废弃,不再维护。未建议替代包。
CakePHP 工具
v13.3.4
2021-08-17 07:27 UTC
Requires
- admad/cakephp-jwt-auth: ^2.0
- admad/cakephp-sequence: ^2.2
- arvenil/ninja-mutex: ^0.6
- burzum/cakephp-file-storage: ^2.0
- burzum/cakephp-imagine-plugin: ^2.0
- cakedc/users: ^8.0
- cakephp/cakephp: ^3.8
- cakephp/migrations: ^2.0
- friendsofcake/crud: ^5.4
- fzaninotto/faker: ^1.0
- josegonzalez/dotenv: ^3.2
- justinrainbow/json-schema: ^5.0
- league/csv: ^8.1
- lorenzo/audit-stash: ^2.0
- maiconpinto/cakephp-adminlte-theme: ^1.0
- mobiledetect/mobiledetectlib: 2.*
- muffin/trash: ^2.1
- myclabs/php-enum: ^1.5
- pyrech/composer-changelogs: ^1.4
- riesenia/cakephp-duplicatable: ^3.0
- rlanvin/php-rrule: ^1.6
- seld/jsonlint: ^1.7
- webmozart/assert: ^1.4
Requires (Dev)
- qobo/cakephp-composer-dev: ^v1.0
- dev-master
- v13.3.4
- v13.3.3
- v13.3.2
- v13.3.1
- v13.3.0
- v13.2.9
- v13.2.8
- v13.2.7
- v13.2.6
- v13.2.5
- v13.2.4
- v13.2.3
- v13.2.2
- v13.2.1
- v13.2.0
- v13.1.x-dev
- v13.1.6
- v13.1.5
- v13.1.4
- v13.1.3
- v13.1.2
- v13.1.1
- v13.1.0
- v13.0.4
- v13.0.3
- v13.0.2
- v13.0.1
- v13.0.0
- v12.3.0
- v12.2.3
- v12.2.2
- v12.2.1
- v12.2.0
- v12.1.1
- v12.1.0
- v12.0.0
- v11.1.0
- v11.0.7
- v11.0.6
- v11.0.5
- v11.0.4
- v11.0.3
- v11.0.2
- v11.0.1
- v11.0.0
- v10.3.4
- v10.3.3
- v10.3.2
- v10.3.1
- v10.3.0
- v10.2.0
- v10.1.0
- v10.0.1
- v10.0.0
- v9.3.0
- v9.2.0
- v9.1.0
- v9.0.0
- v8.0.1
- v8.0.0
- v7.10.2
- v7.10.1
- v7.10.0
- v7.9.1
- v7.9.0
- v7.8.4
- v7.8.3
- v7.8.2
- v7.8.1
- v7.8.0
- v7.7.0
- v7.6.0
- v7.5.4
- v7.5.3
- v7.5.2
- v7.5.1
- v7.5.0
- v7.4.1
- v7.4.0
- v7.3.3
- v7.3.2
- v7.3.1
- v7.3.0
- v7.2.0
- v7.1.3
- v7.1.2
- v7.1.1
- v7.1.0
- v7.0.0
- v6.8.2
- v6.8.1
- v6.8.0
- v6.7.0
- v6.6.0
- v6.5.3
- v6.5.2
- v6.5.1
- v6.5.0
- v6.4.0
- v6.3.0
- v6.2.1
- v6.2.0
- v6.1.4
- v6.1.3
- v6.1.2
- v6.1.1
- v6.1.0
- v6.0.0
- v5.3.1
- v5.3.0
- v5.2.0
- v5.1.1
- v5.1.0
- v5.0.1
- v5.0.0
- v4.7.0
- v4.6.0
- v4.5.1
- v4.5.0
- v4.4.0
- v4.3.0
- v4.2.0
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.0
- v3.3.0
- v3.2.1
- v3.2.0
- v3.1.0
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.2.0
- v2.1.0
- v2.0.0
- v1.4.0
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
- dev-allow-required-false-unique-true
- dev-dependabot/add-v2-config-file
- dev-task-19443-add-exclude-fields-during-conversion-for-each-module
- dev-task-19430-update-schema-wth-new-attributes
- dev-dependabot/composer/burzum/cakephp-imagine-plugin-tw-3.0
- dev-andreasnicolaou-patch-1
- dev-fix-typo
- dev-task-17840-remove-cols-limit
- dev-task-#17840-remove-cols-constraint
- dev-task-17609-define-icons-prefix
- dev-generate-list-modules
- dev-task-16980-virtual-fields
- dev-task-16980-virutal-fields-in-views
- dev-dependabot/composer/league/csv-tw-9.5
- dev-cakephp-v38a
- dev-adding-limits-property
- dev-task-16553-multiple-parents
- dev-task-16415-module-generation
- dev-task-15480-helper-tooltip
- dev-task-11973-List-life-cycle
- dev-task-14498-phpcs-psr12-qobo-utils
- dev-dependabot/composer/rlanvin/php-rrule-tw-2.2
- dev-task-12198-upgrade-cakephp
- dev-template-update
This package is auto-updated.
Last update: 2023-04-17 11:14:02 UTC
README
一系列常见且对多个插件和应用程序有用的实用工具。
此插件由 Qobo 为 Qobrix 开发。它可以作为独立的 CakePHP 插件使用,也可以作为 project-template-cakephp 安装的一部分。
使用方法
使用 composer 安装插件
composer require qobo/cakephp-utils
加载插件
bin/cake plugin load Qobo/Utils --bootstrap
检查插件是否已加载
bin/cake plugin loaded
上述操作应该输出加载的插件列表,其中包含 Qobo/Utils
。
功能
AdminLTE
此插件的主要目标之一是简化 AdminLTE 主题 CakePHP 插件的加载和配置。以下是设置所需的内容。
加载 AdminLTE 插件
bin/cake plugin load AdminLTE --routes --bootstrap
在 config/bootstrap.php
文件的底部加载 AdminLTE 插件配置
Configure::load('admin_lte', 'default');
以下是一个可以插入到 config/admin_lte.php
中的示例配置
<?php return [ 'Theme' => [ 'folder' => ROOT, 'title' => 'My App', 'logo' => [ // This will be displayed when main menu is collapsed. // You can use an <img> tag in here or anything else you want. 'mini' => 'A', // This will be displayed when main menu is expanded. // You can use an <img> tag in here or anything else you want. 'large' => 'My App', ], 'login' => [ 'show_remember' => true, 'show_register' => false, 'show_social' => false, ], ], ];
在 src/Controller/AppController.php
文件的 beforeRender()
方法中加载 AdminLTE 主题
// At the top of the file, together with other use statements: use Cake\Core\Configure; public function beforeRender(Event $event) { $this->viewBuilder()->theme('AdminLTE'); $this->set('theme', Configure::read('Theme')); // $this->set('user', $this->Auth->user()); $this->set('user', []); }
在 src/View/AppView.php
文件的 initialize()
方法中加载 AdminLTE 表单辅助器
public function initialize() { $this->loadHelper('Form', ['className' => 'AdminLTE.Form']); }
有关初始化和配置 AdminLTE 主题的更多信息,请参阅 插件文档