I need to include a subject type as a required context for a ctools content type plugin? How and where is context set for the ctools plugin?
You can define the required context in the plugin definition array. Use the
'required context' key and the
Here are a few lines of stripped down code you can find in the CTools Plugin Example module:
/** * Plugins are described by creating a $plugin array which will be used * by the system that includes this file. */ $plugin = array( 'title' => t('Simplecontext content type'), 'description' => t('Simplecontext content type - works with a simplecontext context.'), 'required context' => new ctools_context_required(t('Simplecontext'), 'simplecontext'), );