本文整理汇总了PHP中Drupal\Component\Plugin\PluginManagerInterface::getCssFiles方法的典型用法代码示例。如果您正苦于以下问题:PHP PluginManagerInterface::getCssFiles方法的具体用法?PHP PluginManagerInterface::getCssFiles怎么用?PHP PluginManagerInterface::getCssFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Component\Plugin\PluginManagerInterface
的用法示例。
在下文中一共展示了PluginManagerInterface::getCssFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCssFiles
/**
* Tests the iframe instance CSS files of plugins.
*/
function testCssFiles()
{
$this->manager = $this->container->get('plugin.manager.ckeditor.plugin');
$editor = Editor::load('filtered_html');
// Case 1: no CKEditor iframe instance CSS file.
$this->assertIdentical(array(), $this->manager->getCssFiles($editor), 'No iframe instance CSS file found.');
// Enable the CKEditor Test module, which has the LlamaCss plugin and
// clear the editor manager's cache so it is picked up.
$this->enableModules(array('ckeditor_test'));
$this->manager = $this->container->get('plugin.manager.ckeditor.plugin');
$settings = $editor->getSettings();
// LlamaCss: automatically enabled by adding its 'LlamaCSS' button.
$settings['toolbar']['rows'][0][0]['items'][] = 'LlamaCSS';
$editor->setSettings($settings);
$editor->save();
// Case 2: CKEditor iframe instance CSS file.
$expected = array('llama_css' => array(drupal_get_path('module', 'ckeditor_test') . '/css/llama.css'));
$this->assertIdentical($expected, $this->manager->getCssFiles($editor), 'Iframe instance CSS file found.');
}