本文整理汇总了PHP中assign::load_plugins方法的典型用法代码示例。如果您正苦于以下问题:PHP assign::load_plugins方法的具体用法?PHP assign::load_plugins怎么用?PHP assign::load_plugins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类assign
的用法示例。
在下文中一共展示了assign::load_plugins方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: annotate_plugin_config_files
/**
* Annotate files from plugin configuration
* @param backup_nested_element $assign the backup structure of the activity
* @param string $subtype the plugin type to handle
* @return void
*/
protected function annotate_plugin_config_files(backup_nested_element $assign, $subtype)
{
$dummyassign = new assign(null, null, null);
$plugins = $dummyassign->load_plugins($subtype);
foreach ($plugins as $plugin) {
$component = $plugin->get_subtype() . '_' . $plugin->get_type();
$areas = $plugin->get_config_file_areas();
foreach ($areas as $area) {
$assign->annotate_files($component, $area, null);
}
}
}
示例2: add_plugin_config_files
/**
* Restore files from plugin configuration
* @param string $subtype the plugin type to handle
* @return void
*/
protected function add_plugin_config_files($subtype)
{
$dummyassign = new assign(null, null, null);
$plugins = $dummyassign->load_plugins($subtype);
foreach ($plugins as $plugin) {
$component = $plugin->get_subtype() . '_' . $plugin->get_type();
$areas = $plugin->get_config_file_areas();
foreach ($areas as $area) {
$this->add_related_files($component, $area, null);
}
}
}