Instead of converting providing a backward compability layer #1704824: Update plugin system to use core plugin system
for all ctools plugins we need, because of the removal of the registry tomorrow
a fast solution, so let's convert the export_ui specific code to annotations/the new plugin system.

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new42.84 KB

In order to get it working this is the more or less a minimal approach to get it working

  • Create a really simply plugin manager which uses annotations and the default factory
  • To fill in default values the old function ctools_export_ui_process() is used.
  • In export-ui.inc the manager is used to get the instance and the plugin information.
  • The base Plugin itself got moved to PSR0
  • In order to get annotations working "foo bar" had to be converted to "foo_bar" in the plugins definition
  • As PHP has it's own namespace interpretation you can't use procedural functions in the same file as the class.
    Just for the ease of the approach i moved all the procedural functions into export-ui.inc and added a todo.

Possible TODOs/Follow-Ups:

  • Convert the other existing export ui instances beside of ctools standard/views ui

This patch allows me to see the listing interface of views and do all the usual stuff on top of it.

dawehner’s picture

StatusFileSize
new46.99 KB

Converted stylizer and fixed some annotations " " to "_".

dawehner’s picture

Title: Convert export_ui to annotations » gg
StatusFileSize
new4.35 KB

Add the views part of it

Status: Needs review » Needs work

The last submitted patch, views-1764194-3.patch, failed testing.

dawehner’s picture

Title: gg » Convert export_ui to annotations
Status: Needs work » Needs review
StatusFileSize
new50.22 KB

This happens if you use VI commandos to browse on the web.

This patch includes the conversions for all examples of ctools export UI in ctools itself.

dawehner’s picture

StatusFileSize
new50.31 KB

After feedback from aspilicious:
Added missing caching for the annotations scanning.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

There are some UGLY looking function names in there. But it can be revisited later, this needs to go in now.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

A couple places were missing the lib directory, moved that around.
http://drupalcode.org/project/ctools.git/commit/20d83d9

Automatically closed -- issue fixed for 2 weeks with no activity.