Giter Club home page Giter Club logo

typo3toolbox's Introduction

Typo3 ToolBox

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

typo3toolbox's People

Contributors

tlueder avatar krohnmi avatar juliasaurin avatar

Watchers

 avatar  avatar

typo3toolbox's Issues

Type error in QueryUtility::queryOrderBy

Parameter #2 $query of static method
JAKOTA\Typo3ToolBox\Utility\QueryUtility::queryOrderBy() expects
TYPO3\CMS\Extbase\Persistence\Generic\Query,
TYPO3\CMS\Extbase\Persistence\QueryInterface<JAKOTA\Newsletter\Domain
\Model\News> given.

[Bug] DependencyInjection\Exception

(1/1) Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
Expected to find class "JAKOTA\Typo3ToolBox\Domain\Model\Api\Reponse" in file "/var/www/public/typo3conf/ext/typo3toolbox/Classes/Domain/Model/Api/Reponse.php" while importing services from resource "../Classes/*", but it was not found! Check the namespace prefix used with the resource.

Feature: change param to int

Classes/Utility/DateUtility.php

calculateRelativeDate(\DateTime $date) {

to

calculateRelativeDate(int $timestamp) {

This is needed for #39

@KrohnMi
I guess you used this DateUtility already somewhere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.