承接 namelesscoder/typo3-cms-data-processors 相关项目开发

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

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

namelesscoder/typo3-cms-data-processors

最新稳定版本:1.0.0

Composer 安装命令:

composer require namelesscoder/typo3-cms-data-processors

包简介

README 文档

README

Additional TypoScript data processors for your TYPO3 installation.

You already know how to use Composer packages. This one is called namelesscoder/typo3-cms-data-processors.

Structured Variables Data Processor

Intended to fill the gap between FLUIDTEMPLATE data processors and variables, which allow only a single level of variables, to facilitate creation and overriding of structured variables.

Allows you to do two important things you normally cannot:

  1. Other data processors which support the as argument gain support for using dotted paths as target variable name, for example, the menu data processor can put the menu items array into a nested array in Fluid.
  2. TypoScript objects can also be rendered and assigned as template variables using dotted path variable names.

In addition the data processor allows overwriting variables in already assigned arrays such as the settings array - even overriding model object instance properties is possible if you have previously assigned a domain model instance as a template variable.

Examples:

# First, a standard data processor - except with a dotted-name variable in "as"
page.10.dataProcessing.150 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
page.10.dataProcessing.150 {
     levels = 4
     as = foo.bar.menu
     expandAll = 1
     titleField = nav_title // title
}

# The StructuredVariablesProcessor must always come last...
page.10.dataProcessing.5000 = NamelessCoder\DataProcessors\StructuredVariablesProcessor

# ...and it can define any number of TS objects as first-level children
page.10.dataProcessing.5000.searchText = TEXT
page.10.dataProcessing.5000.searchText.value = Test...
# ...which now also supports (actually, requires) an "as" attribute
page.10.dataProcessing.5000.searchText.as = foo.bar.text
# ...that then creates that variable and has it re-mapped by the structured variables processor.

Resulting array structure that becomes a Fluid variable:

[
     "foo" => [
             "bar" => [
                     "menu" => [...array of menu items...],
                     "text" => "Test..."
             ]
     ]
]

Which means you can reference the two new variables as:

 {foo.bar.menu}
 {foo.bar.text}

Credits

This package contains work sponsored by SYZYGY GmbH. If you work with TYPO3 then SYZYGY may be looking for someone just like you!!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-09-03