[Neos] Creating Plugins and using them.

armin otto arminotto at gmail.com
Wed Jun 17 16:01:25 CEST 2015


Hi,

I've been trying to create a plugin for Neos, using the guide I found here: http://docs.typo3.org/neos/TYPO3NeosDocumentation/IntegratorGuide/CreatingAPlugin.html


Thus far, I could create a package with a model, an generate a migration

/flow kickstart:package Sarkosh.CdCollection
/flow kickstart:model Sarkosh.CdCollection Album title:string year:integer description:string rating:integer
/flow kickstart:repository Sarkosh.CdCollection Album

/flow doctrine:migrationgenerate
mkdir -p Packages/Application/Sarkosh.CdCollection/Migrations/Mysql
mv Data/DoctrineMigrations/Version*.php Packages/Application/Sarkosh.CdCollection/Migrations/Mysql/
/flow doctrine:migrate

Then I created  "Configuration/NodeTypes.yaml" and "Resources/Private/TypoScript/Plugin.ts2" in the package and tweaked my site package's Root.ts2 to include the newly created TypoScript file.

I also modified the site's Policy.yaml to allow the Plugin Controller to work - something that wasn't mentioned anywhere.


In the end, I got the plugin running, but I wonder how to make use of the MVC architecture.
For example, I can create a page and include my plugin on it, and I can tweak the controller and the view to generate my output, but I have no idea how to access the database model I created.

What do I have to do to e.g. display all Albums entered in the Database?

Sadly, I found no tutorials around that go farther than putting strings on the screen.







More information about the Neos mailing list