Basic Usage

Installation

If you don’t have a FLOW3 Project set up yet take a look at this: http://flow3.typo3.org/documentation/quickstart.html

Installing Admin:

cd %FLOW3-Project-Directory%
git clone git@github.com:mneuhaus/FLOW3-Admin.git Packages/Application/Admin
./flow3 package:activate Admin
./flow3 doctrine:migrate

Adding AdminDemo as well:

cd %FLOW3-Project-Directory%
git clone git@github.com:mneuhaus/FLOW3-AdminDemo.git Packages/Application/AdminDemo
./flow3 package:activate AdminDemo
./flow3 doctrine:migrate

Quick start

There are 2 Ways to Configure the Admin Interface:

  1. Settings.yaml

  2. Class Reflections inside the Models

    Note: The Settings.yaml overrules the Class Reflections in order to make it Possible to change the Behaviour of 3rd Party Packages without messing with external Code.

Settings.yaml:

Admin:
    Beings:
        \TYPO3\Blog\Domain\Model\Post:
            Active: true
            Properties:
                content:
                    Widget: TextArea

This Example Activates the Post model of the Blog Example (autoadmin:true) and Changes the Widget for the Content Property from a simple Textfield to a Textarea

Class Reflections:

use Admin\Annotations as Admin;
/**
 * A blog post
 * ...
 * @Admin\Active
 */
class Post {
    /**
     * @var string
     * @Admin\Widget("TextArea")
     */
    protected $content;
}

This Example Does the exact same thing as the Settings.yaml Example but this time inside the Post.php file with the Tag @AdminActive and @AdminWidget(“TextArea”)