sitegeist/fusionlinkprototypes 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sitegeist/fusionlinkprototypes

Composer 安装命令:

composer require sitegeist/fusionlinkprototypes

包简介

Missing Prototypes for easier linking to actions and modules

README 文档

README

Missing Prototypes for easier linking to actions and modules.

By default the linking between backend modules or from backend modules has been cumbersome. Since modules use a subrequest the Neos UriBuilder created all links inside the module.

This package adds the prototypes Sitegeist.FusionLinkPrototypes:ActionUri, Sitegeist.FusionLinkPrototypes:ActionLink and Sitegeist.FusionLinkPrototypes:ModuleUri, Sitegeist.FusionLinkPrototypes:ModuleLink that always use the current main request to avoid this confusion.

!!! Those prototypes likely will end up in Neos eventually. The package here provides a replacement for older versions of Neos plus allows to play with the api and behavior before creating a core-pr !!!

Authors & Sponsors

The development and the public-releases of this package is generously sponsored by our employer http://www.sitegeist.de.

Installation

Sitegeist.FusionLinkPrototypes is available via packagist run composer require sitegeist/fusionlinkprototypes. We use semantic versioning so every breaking change will increase the major-version number.

Usage

Sitegeist.FusionLinkPrototypes:ActionUri

Built a URI to a controller action

  • package (string) The package key (e.g. My.Package)
  • subpackage (string) The subpackage, empty by default
  • controller (string) The controller name (e.g. Registration)
  • action (string) The action name (e.g. new)
  • arguments (array) Arguments to the action by named key
  • format (string) An optional request format (e.g. html)
  • section (string) An optional fragment (hash) for the URI
  • additionalParams (array) Additional URI query parameters by named key
  • addQueryString (boolean) Whether to keep the query parameters of the current URI
  • argumentsToBeExcludedFromQueryString (array) Query parameters to exclude for addQueryString
  • absolute (boolean) Whether to create an absolute URI

Example::

uri = Sitegeist.FusionLinkPrototypes:ActionUri {
	package = 'My.Package'
	controller = 'Registration'
	action = 'new'
}

Sitegeist.FusionLinkPrototypes:ActionLink

Extends Neos.Fusion:Tag and adds an attributes.href defined as Sitegeist.FusionLinkPrototypes:ActionUri

Tag properties:

  • tagName (string) Tag name of the HTML element, defaults to a
  • content (string) The inner content of the element, will only be rendered if the tag is not self-closing and the closing tag is not omitted
  • attributes (iterable) Tag attributes as key-value pairs. Default is Neos.Fusion:DataStructure. If a non iterable is returned the value is casted to string.
  • attributes.href defined as Sitegeist.FusionLinkPrototypes:ActionLink
  • ... for more see the documentation of Neos.Fusion:Tag

ActionUri properties:

  • package (string) The package key (e.g. My.Package)
  • subpackage (string) The subpackage, empty by default
  • controller (string) The controller name (e.g. Registration)
  • action (string) The action name (e.g. new)
  • arguments (array) Arguments to the action by named key
  • format (string) An optional request format (e.g. html)
  • section (string) An optional fragment (hash) for the URI
  • additionalParams (array) Additional URI query parameters by named key
  • addQueryString (boolean) Whether to keep the query parameters of the current URI
  • argumentsToBeExcludedFromQueryString (array) Query parameters to exclude for addQueryString
  • absolute (boolean) Whether to create an absolute URI

Example::

link = Sitegeist.FusionLinkPrototypes:ActionLink {
	content = "Register new user"
	package = 'My.Package'
	controller = 'Registration'
	action = 'new'
}

Sitegeist.FusionLinkPrototypes:ModuleUri

Built a URI to a backend module. This allows to link between backend modules !!! For links to the Neos content module read the dedicated section !!!

  • module (string) The module path (e.g. content or management/sites)
  • controller (string) The controller name (e.g. Registration)
  • action (string) The action name (e.g. new)
  • arguments (array) Arguments to the action by named key
  • format (string) An optional request format (e.g. html)
  • section (string) An optional fragment (hash) for the URI
  • additionalParams (array) Additional URI query parameters by named key
  • addQueryString (boolean) Whether to keep the query parameters of the current URI
  • argumentsToBeExcludedFromQueryString (array) Query parameters to exclude for addQueryString
  • absolute (boolean) Whether to create an absolute URI

Example::

uri = Sitegeist.FusionLinkPrototypes:ModuleUri {
	module="administration/sites"
	action="edit"
	arguments.site = ${site}
}

Sitegeist.FusionLinkPrototypes:ModuleLink

Extends Neos.Fusion:Tag and adds an attributes.href defined as Sitegeist.FusionLinkPrototypes:ModuleUri !!! For links to the Neos content module read the dedicated section !!!

Tag properties:

  • tagName (string) Tag name of the HTML element, defaults to a
  • content (string) The inner content of the element, will only be rendered if the tag is not self-closing and the closing tag is not omitted
  • attributes (iterable) Tag attributes as key-value pairs. Default is Neos.Fusion:DataStructure. If a non iterable is returned the value is casted to string.
  • attributes.href defined as Sitegeist.FusionLinkPrototypes:ActionLink
  • ... for more see the documentation of Neos.Fusion:Tag

ModuleUri properties:

  • module (string) The module path (e.g. content or management/sites)
  • controller (string) The controller name (e.g. Registration)
  • action (string) The action name (e.g. new)
  • arguments (array) Arguments to the action by named key
  • format (string) An optional request format (e.g. html)
  • section (string) An optional fragment (hash) for the URI
  • additionalParams (array) Additional URI query parameters by named key
  • addQueryString (boolean) Whether to keep the query parameters of the current URI
  • argumentsToBeExcludedFromQueryString (array) Query parameters to exclude for addQueryString
  • absolute (boolean) Whether to create an absolute URI

Example::

link = Sitegeist.FusionLinkPrototypes:ModuleLink {
	content = "To the site module"
	module="administration/sites"
	action="edit"
	arguments.site = ${site}
}

Linking to the Neos content-module

As the Neos content-module is not based on other backend modules it is linked via Sitegeist.FusionLinkPrototypes:ActionLink.

Example::

contentModuleLink = Sitegeist.FusionLinkPrototypes:ActionLink {
	content = "To the content module"
	package="Neos.Neos.Ui"
	controller="Backend"
	action="index"
	arguments.node = ${node}
}

contentModuleUri = Sitegeist.FusionLinkPrototypes:ActionUri {
	module="administration/sites"
	action="edit"
	arguments.node = ${node}
}

Contribution

We will gladly accept contributions. Please send us pull requests.

sitegeist/fusionlinkprototypes 适用场景与选型建议

sitegeist/fusionlinkprototypes 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 33.83k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2022 年 06 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 sitegeist/fusionlinkprototypes 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sitegeist/fusionlinkprototypes 我们能提供哪些服务?
定制开发 / 二次开发

基于 sitegeist/fusionlinkprototypes 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2022-06-21