定制 surda/back-button 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

surda/back-button

Composer 安装命令:

composer require surda/back-button

包简介

Back button control for Nette Framework

README 文档

README

Build Status Licence Latest stable PHPStan

Installation

The recommended way to is via Composer:

composer require surda/back-button

After that you have to register extension in config.neon:

extensions:
    backButton: Surda\BackButton\BackButtonExtension

Configuration

Default

backButton:
    defaultPresenterLink: 'default'
    templates:
        default: bootstrap4.default.latte
        secondary: bootstrap4.secondary.latte

List of all configuration options:

backButton:
    defaultPresenterLink: 'default'
    useAjax: false
    template: path/to/your/latte/file.latte
    # or
    templates:
        default: path/to/your/latte/file.latte
        foo: path/to/your/latte/foo.latte
        ...

Usage

Presenter

use Nette\Application\UI\Presenter;
use Surda\BackButton\InjectBackButton;

abstract class ProductPresenter extends Presenter
{
    use InjectBackButton;
}

Template

Source page (e.g. Product:default) add link to default.latte

<a n:href="detail $id, destination => $currentLink">Detail</a>

Destination page (Product:detail) add component to detail.latte

{control backButton}

Destination

Presenter

$this->template->destination = $this->link('detail', $id);

Latte

{control backButton destination:$destination}

Select control template file

Default template

{control backButton} or {control backButton default}  

Set control template by type of template (see config.neon)

{control backButton templateType}

Reset

Reset persistent parameter $destination in URL ...?destination=%2Fproduct

<a n:href="default, destination => NULL">Products</a>

or all (defined) persistent parameters

<a n:href="default, (expand) $resetPersistentParameters">Products</a>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固