Giter Site home page Giter Site logo

ext-coreapi's Introduction

Stories in Ready Build Status Scrutinizer Code Quality Code Coverage

TYPO3 Extension 'coreapi'

The EXT:coreapi should provide a simple to use API for common core features. Goal is to be able to do the most common tasks by CLI instead of doing it in the backend/browser.

Beside of CLI commands, EXT:coreapi provides service classes, which can be used in your own implementation/extension.

Checkout the project website at forge.typo3.org: http://forge.typo3.org/projects/show/extension-coreapi

Tasks

  • DatabaseApi
    • databaseCompare
  • CacheApi
    • clearAllCaches
    • clearPageCache
    • clearConfigurationCache
  • ExtensionApi
    • info
    • listInstalled
    • updateList from TER
    • fetch an extension from TER
    • import an extension
    • install / uninstall extension
    • create upload folders
    • configure extension
  • SiteApi
    • info
    • createSysNews

planned/comming soon

  • Backend
    • manage users (list, create, update, delete)
    • lock/unlock the TYPO3 backend
  • PageTree
    • print/get
  • DataApi
    • generic list/create/update/delete records (and not doing the plain SQL, but using the DataHandler (aka tcemain)!)
    • getRecordsByPid
    • create a database dump (exclude "temporary" tables like caches, sys_log, ...)
  • ReportsApi
    • run/check the reports from the reports module
  • ConfigurationApi
    • list, get and set TYPO3 configurations

CLI call:

Make sure you have a backend user called _cli_lowlevel

If you want to use the cache clearing commands, you need to add the following snippet to the TSconfig field of this backend user:

options.clearCache.all=1
options.clearCache.pages=1

TYPO3 6.2 and below

Support for TYPO3 CMS below 6.2 was removed with version 0.2.0 of this extension. In case you need to use ext:coreapi in combination with lower version of TYPO3 CMS use version 0.1.0-beta.

TYPO3 6.2+

If you are using TYPO3 6.2+, you can use the awesome CommandController of Extbase.

This will show you all available calls ./typo3/cli_dispatch.phpsh extbase help

Usage in Composer

{
    "name": "typo3cms/test-website",
    "description": "TYPO3 CMS: test.com",
    "keywords": ["typo3", "cms"],
    "require": {
        "php": ">=5.3.3",
        "typo3core/cms": "*",
        "etobi/coreapi": "dev-master",
    },
    "extra": {
        "installer-paths": {
            "typo3conf/ext/{$name}": [
                "type:typo3-cms-extension"
            ]
        }
    },
    "minimum-stability": "dev",
    "require-dev": {},
    "scripts": {}
}

Running the unit tests

The Unit Tests rely on vfsStream. For some reasons ext:coreapi don't add this dependencies by itself but uses the one which is alread defined for Core Unit Tests. To install vfsStream copy the composer.json from the TYPO3 CMS package into you webroot folder and execute the command composer install. This will install all dependencies into Packages/Libraries/.

Then run the Unit Tests.

cp typo3_src/composer.json .
composer install
./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml typo3conf/ext/coreapi/Tests/Unit/

ext-coreapi's People

Contributors

etobi avatar georgringer avatar bmoex avatar 7elix avatar oliverklee avatar konafets avatar christophlehmann avatar greinerdavid avatar langeland avatar waffle-iron avatar smichaelsen avatar madsbrunn avatar

Watchers

James Cloos avatar Jan-Erik Revsbech avatar Abed Sujan avatar Patrick Reck avatar Mathias Jahn-Nielsen avatar Tobias Wilchen avatar MOC A/S Developer avatar Rikke Perriard avatar  avatar

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.