function bean_check_plugin_class in Bean (for Drupal 7) 7
Check the plugin type class
Parameters
$class string: The name of the bean type class
Return value
Boolean
2 calls to bean_check_plugin_class()
- BeanTestPlugins::testBeanLoadPlugin in tests/
BeanTestPlugins.test - Test loading of the plugin.
- bean_load_plugin_class in ./
bean.module - Load a widget class
File
- ./
bean.module, line 488 - Block Entity
Code
function bean_check_plugin_class($class) {
$ref_class = new ReflectionClass($class);
if ($ref_class
->isInstantiable() && in_array('BeanTypePluginInterface', $ref_class
->getInterfaceNames())) {
return TRUE;
}
return FALSE;
}