jakota/typo3toolbox

Typo3 ToolBox of Utility functions and ViewHelpers.

Installs: 8 133

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 2

Open Issues: 0

Type:typo3-cms-extension

4.0.2 2024-10-21 16:23 UTC

README

ToolBox of Utility functions and ViewHelpers.

Configuration

To use this extension, require it in Composer:

composer require jakota/typo3toolbox

Utility functions

DebuggerUtility for SQL queries

Debug your SQL queries made easy.

Dump SQL Query for createQuery

    $query = $this->createQuery();

    DebuggerUtility::debugQuery($query)

Dump SQL Query for QueryBuilder

    $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('table')->createQueryBuilder();
    $queryBuilder
      ->select('*')
      ->from('table')
      ->where(
        $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter(123)),
      )
      ->setMaxResults(1)
    ;

    DebuggerUtility::debugQuery($queryBuilder)

ViewHelpers

install

Add to template

<html xmlns:t3tb="http://typo3.org/ns/JAKOTA/Typo3ToolBox/ViewHelpers" data-namespace-typo3-fluid="true">

Find image metadata from DB

{t3tb:findImageMetadataFromDB(uid:image.originalResource.properties.file,language:image.originalResource.properties.sys_language_uid)}

Relative Date

<t3tb:relativeDate value="{newsItem.datetime}"/>

TBD