There are several different plugin types in SPS. Create the piping between them so there is a common interface to work with plugins.

Ctools plugin system will be the base.

Comments

indytechcook’s picture

Issue tags: +lsd-csi sprint 1

Using the Namespace Drupal\sps\Plugins\
will allow for DI plugins withotu using ctools file loading logic. The logic is not needed using xautolaod's functionality.

indytechcook’s picture

So this idea wasn't very flexible. I went back to a more info hook based approach. I'm writing up documentation.

indytechcook’s picture

The base plugin factory has been pushed to the plugins branch. Testing and more documentation are being worked on.

e2thex’s picture

So I think it would be nice if all validation of the plugin happened when the plugin info is parsed and stored.

I think that all of the implements validation should get moved out of getPlugin and instead done in validatePluginInfo (which is called in loadPluginInfo).

Also in loadPluginInfo the defaults from the types should be combined into the Plugin info. I think when this is done the pluginTypeInfo will not be need at all in the getPlugin Method.

e2thex’s picture

one more thing id do not think

$plugin_obj = new $class_name($plugin_info['instance_settings'], $manager); 

I think you might need to do something like

  $r = new \ReflectionClass($info['class']);
  return $r->newInstanceArgs(array($info['instance_settings'], $manager));
indytechcook’s picture

This has been committed to the 7.x-1.x branch because it was merged into another branch that was merged in. I'm keeping this open to work out the final issues and tests.

indytechcook’s picture

Branch has been updated. Tests still need to be written

indytechcook’s picture

@e2thex in comment #5 why do you think that new $class() will not work?

indytechcook’s picture

Status: Active » Fixed

This is merged in.

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

indytechcook’s picture

Component: Miscellaneous » SPS Framework
Category: Support request » Task
Priority: Normal » Critical
Status: Active » Closed (fixed)