qbus / qbtools
Basic tools for other qbus extensions
Installs: 39
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
pkg:composer/qbus/qbtools
Requires
- typo3/cms-core: ^12.4
- typo3/cms-extbase: ^12.4
- typo3/cms-fluid: ^12.4
- typo3/cms-frontend: ^12.4
Requires (Dev)
- php-coveralls/php-coveralls: ^2.0
- phpspec/prophecy: ^1.7
- rector/rector: ^0.12.5
- typo3/testing-framework: ^2.0 || ^4.9 || ^6.2
Replaces
- typo3-ter/qbtools: 4.0.1
README
Introduction
This extension provides a set of ViewHelpers and Hooks that are used
to implement TYPO3 based websites by Qbus.
Some ViewHelpers (like qbtools:fetch or qbtools:fal) are not meant
to be used as preferred solution, but are rather available when a proper
implementation (using repository classes) is not possible – e.g. when
data needs to be retrieved from the database in a template of a generic
community extension.
Usage
$ composer require qbus/qbtools:^3.0
Quick Example
{namespace qbtools=Qbus\Qbtools\ViewHelpers}
<!-- Fetch (top) blog posts of some Extbase model and display using
a partial of some (external) extension. -->
<qbtools:fetch model="Vendor\\MyBlog\\Domain\\Model\\Post" match="{top: 1}" as="posts">
<f:for each="{posts}" as="post">
<qbtools:renderExternal partial="Blog/Teaser" extensionName="MyBlog" arguments="{post: post}"/>
</f:for>
</qbtools:fetch>
<!-- Render content from page with uid 340 -->
<qbtools:renderContent pid="340"/>
<!-- Render colPos 1 content from page with uid 340 -->
<qbtools:renderContent pid="340" colpos="1" />
<!-- Render content element with uid 230 -->
<qbtools:renderContent uid="230"/>
<!-- Quick an dirty call to a PHP function -->
<qbtools:call func="str_replace" params="{0: '_', 1: ' ', 2: 'foo_bar'}" as="result">
<!-- will print 'foo bar' -->
{result}
</qbtools:call>