承接 delboy1978uk/bone-settings 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

delboy1978uk/bone-settings

最新稳定版本:v1.3.0

Composer 安装命令:

composer require delboy1978uk/bone-settings

包简介

A generic settings entity

README 文档

README

build status Code Coverage Scrutinizer Code Quality

A generic settings doctrine entity

installation

composer require delboy1978uk/settings

configuration

There is a default Bone\Settings\Entity\UserSettings entity, and/or you can create your own. Simply add the package class to Bone's package config if using bone Framework, or add vendor/delboy1978uk/bone-settings/src/Entity as one of your entity paths if not .

<?php

// other use statements here
use Bone\Settings\SettingsPackage;

return [
    'packages' => [
        // other packages here ...
        SettingsPackage::class,
    ],
    // ...
];

usage

The abstract settings entity has a dual primary key of a group id and owner id. Think of the settings group as category id of settings, so as an example "email preferences" could be group 1, and "storage prefernces" could be group 2. Where you determine that number is not the concern of this package, but you don't need to use it, it has a default of 1. The owner field is for whoever or whatever owns these settings, so in the case of UserSettings, the owner id would be the user's id.

custom classes

Simply extend Bone\Settings\Entity\AbstractSettings and add the #[ORM\Entity] annotation. See the Bone\Settings\Entity\UserSettings class as an example.

统计信息

  • 总下载量: 197
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-29