定制 g4b0/sitetree-walk 二次开发

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

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

g4b0/sitetree-walk

Composer 安装命令:

composer require g4b0/sitetree-walk

包简介

Walk through the SiteTree, and hooks implementors of SiteTreeWalkListener interface letting them doing things over each page.

README 文档

README

Implementation of the annoying task to walk through the entire SiteTree in order to do things over the pages.

Introduction

This module by itself does not do anything, it just iterate recursively through the SiteTree and hooks every implementor of SiteTreeWalkListener interface letting them doing things over each page.

Requirements

  • SilverStripe >= 4.1 < 5.0

For 3.x installations refer to the 1.x version

Installation

Install the module through composer:

composer require --no-update g4b0/sitetree-walk
composer update --no-dev g4b0/sitetree-walk

Running the task.

Before running the task you need to implement your logic extending SiteTreeWalkListener interface. An example is provided with SiteTreeWalkPrint, that simply prints out the page title. To enable it set its member variable SiteTreeWalkPrint::$enabled to true. SiteTreeWalkListener implementor's run() method should return true for the processed pages, false for the excluded ones. Following the output of the sample:

#sake dev/tasks/SiteTreeWalk "flush=all"
Running Task SiteTreeWalk

Following SiteTreeWalkListener Implementors will be executed: 
	* SiteTreeWalkPrint

Continue? [y|n]y

Home 
Test 
	Test 2 
	Test 3 
Chi siamo 
Contattaci 
Pagina non trovata  *** Excluded from processing
Errore server  *** Excluded from processing
My Page 

################################################
Traversed Pages: 9

Processed Pages: 
	SiteTreeWalkPrint: 9
################################################

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2018-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固