承接 eye4web/zfc-user-settings 相关项目开发

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

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

eye4web/zfc-user-settings

Composer 安装命令:

composer require eye4web/zfc-user-settings

包简介

Adds settings functionality to ZfcUser

README 文档

README

Introduction

This adds user settings to ZfcUser. Examples of user settings could be:

  • Does the user want newsletter
  • Favourite color
  • Show profile picture
  • Whatever you want

Note: This module does not give the user the functionality to edit his/her settings. You have to add that functionality yourself. The reason for this is that a setting could be a input, radio, checkbox, select, etc. So instead of taking all this into account and creating some crazy code, you have to do it yourself.

Installation

With composer

  1. Add this project composer.json:

    "require": {
        "eye4web/zfc-user-settings": "dev-master"
    }
  2. Now tell composer to download the module by running the command:

    $ php composer.phar update
  3. Enable it in your application.config.php file.

    <?php
    return array(
        'modules' => array(
            // ...
            'Eye4web\ZfcUser\Settings'
        ),
        // ...
    );
  4. Create database schema(see data folder for dumps)

Usage

First of all you have to create your settings. You do this by inserting a row into the settings table in your database. Be sure to make the id something which is easy to read, for example allow_email.

There are a controller plugin and a viewhelper, both named ZfcUserSetting. Both takes two arguments, the setting id and an optional user object. If no user is supplied it will use the currently logged in user.

Now all you have to do is call $this->ZfcUserSetting('allow_email') and you will get the user setting value.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 4
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-07