承接 novicell/premium_tools 相关项目开发

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

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

novicell/premium_tools

最新稳定版本:1.4.0

Composer 安装命令:

composer require novicell/premium_tools

包简介

Premium Tools

关键字:

README 文档

README

The module has no special installation steps. This document will explain what features it provides and how you can use them.

What are the features of this module?

  • Each developer who adds code to this module is responsible for adding a feature description in this file, or providing an example in an example file in the module.

Ajax Commands

The 'ScrollTo' Ajax Command

  • Purpose:

With this command you can make an ajax form scroll on an action. This is useful when removing/showing new content in an Ajax form.

  • Usage:
  1. Add the library to your form, like so $form['#attached']['library'][] = 'dds_tools/scroll_to_command';
  2. Use the command in your Ajax callback function, like so:
    $response = new JsonResponse();
    $response->addCommand(new ScrollToCommand([
          'selector' => '#selector',
          'header_selectors' => ['.js-header', '.js-main-navigation'],
          'offsetOrPosition' => 'offset',
        ]));
    return $response;

The parameters for the command are as follows: The parameters for the command are as follows:

  • selector: string
    • The selector to scroll to.
  • header_selector: array
    • If the site has a fixed header, give the header class(es) to offset it.
  • offsetOrPosition: string
    • If the scroll should be relative to the document or to the selector.
      • 'offset' is relative to the document
      • '' will default to using jQuery position, relative to the selector.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2025-07-08