本文整理汇总了PHP中Drupal\Core\Config\Entity\ConfigEntityInterface::save方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigEntityInterface::save方法的具体用法?PHP ConfigEntityInterface::save怎么用?PHP ConfigEntityInterface::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Config\Entity\ConfigEntityInterface
的用法示例。
在下文中一共展示了ConfigEntityInterface::save方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
/**
* {@inheritdoc}
*/
public function setUp()
{
parent::setUp();
$this->installSchema('system', 'key_value_expire');
// The server tasks manager is needed when removing a server.
$mock = $this->getMock('Drupal\\search_api\\Task\\ServerTaskManagerInterface');
$this->container->set('search_api.server_task_manager', $mock);
// Create the index object, but don't save it yet since we want to change
// its settings anyways in every test.
$this->index = Index::create(array('id' => 'test_index', 'name' => 'Test index', 'tracker_settings' => array('default' => array('plugin_id' => 'default', 'settings' => array())), 'datasource_settings' => array('entity:user' => array('plugin_id' => 'entity:user', 'settings' => array()))));
// Use a search server as the dependency, since we have that available
// anyways. The entity type should not matter at all, though.
$this->dependency = Server::create(array('id' => 'dependency', 'name' => 'Test dependency', 'backend' => 'search_api_test_backend'));
$this->dependency->save();
}