定制 kaystrobach/typo3-polyfill-paginateviewhelper 二次开发

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

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

kaystrobach/typo3-polyfill-paginateviewhelper

最新稳定版本:1.0.2

Composer 安装命令:

composer require kaystrobach/typo3-polyfill-paginateviewhelper

包简介

Polyfill for the removed paginate ViewHelper

README 文档

README

Contributors Forks Issues GPL License

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

The projects provides a polyfill for the paginateViewHelper widget, which was deprecated in TYPO3 v10 and finally removed in TYPO3 v11+.

<f:widget.paginate objects="{blogs}" as="paginatedBlogs" configuration="{itemsPerPage: 5, insertAbove: 1, insertBelow: 0, maximumNumberOfLinks: 10}">
    use {paginatedBlogs} as you used {blogs} before, most certainly inside
    a <f:for> loop.
</f:widget.paginate>

One nive thing about the viewHelper was, that it supports pagination up till the database level:

In the above examples, it looks like {blogs} contains all Blog objects, thus you might wonder if all objects were fetched from the database. However, the blogs are NOT fetched from the database until you actually use them, so the paginate ViewHelper will adjust the query sent to the database and receive only the small subset of objects. So, there is no negative performance overhead in using the Paginate Widget.

Built With

  • PHP
  • TYPO3

(back to top)

Getting Started

Prerequisites

You need a project with a supported TYPO3 Version. Currently this is only TYPO3 Version 11.

Installation

composer require kaystrobach/typo3-polyfill-paginateviewhelper

(back to top)

Usage

<f:widget.paginate objects="{blogs}" as="paginatedBlogs">
   use {paginatedBlogs} as you used {blogs} before, most certainly inside
   a <f:for> loop.
</f:widget.paginate>

(back to top)

Roadmap

Don't use this polyfill to jumpstart new projects. If you are starting a new project follow the Coding guidelines of TYPO3 and use propert current techniques.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Attention, we will only accept contributions to enhance stability, any changes which modify the behaviour (seen from the fluid side) will be rejected.

(back to top)

License

Distributed under the GPL-2.0-or-later License, as this is a derived work from the TYPO3 core. See LICENSE.txt for more information.

(back to top)

Contact

Kay Strobach - @kaystrobach

Project Link: https://github.com/kaystrobach/typo3-polyfill-paginateviewhelper

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2022-11-25