Data sourcesΒΆ

Data sources allow easy integration of data source end points, to provide data to the editing interface without having to define routes, policies, controller.

Data sources can be used for various purposes, however the return format is restricted to JSON. An example of their usage is as a data provider for the inspector SelectBoxEditor.

A data source is defined by an identifier and this identifier has to be unique.

To implement a data source, create a class that implements TYPO3\Neos\Service\DataSource\DataSourceInterface, preferably by extending TYPO3\Neos\Service\DataSource\AbstractDataSource. Then set the static protected property identifier to a string. Make sure you use a unique identifier, e.g. acme-demo-available-dates.

Then implement the getData method, which has the following parameters:

  • NodeInterface $node = NULL (optional)
  • array $arguments (key / value)

The return of the method must be JSON serializable data.

Data sources are available with the following URI pattern /neos/data-source/<identifier>, which can be linked to using the follow parameters:

Arbitrary additional arguments are allowed. Additionally the routing only accepts GET requests.

If additional arguments are provided then they will automatically be available in the $arguments parameter of the getData method. Additional arguments will not be property mapped, meaning they’ll contain their plain value. However if a argument with the key node is provided, it will automatically convert this into a node. Provide a valid node path to use this, and keep in mind that the node argument is restricted to this use-case. This is done to make working with nodes easy. The dataSourceIdentifier will automatically be removed from the arguments parameter.


Data sources are restricted to only be accessible for users with the TYPO3.Neos:Backend.DataSource privilege, which is included in the TYPO3.Neos:Editor role. This means that a user has to have access to the backend to be able to access a data point.

Example TestDataSource.php:

namespace Acme\YourPackage\DataSource;

use TYPO3\Neos\Service\DataSource\AbstractDataSource;
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;

class TestDataSource extends AbstractDataSource {

         * @var string
        static protected $identifier = 'acme-yourpackage-test';

         * Get data
         * @param NodeInterface $node The node that is currently edited (optional)
         * @param array $arguments Additional arguments (key / value)
         * @return array JSON serializable data
        public function getData(NodeInterface $node = NULL, array $arguments) {
                return isset($arguments['integers']) ? array(1, 2, 3) : array('a', 'b', 'c');