本文整理匯總了PHP中Drupal\views\Entity\View::loadMultiple方法的典型用法代碼示例。如果您正苦於以下問題:PHP View::loadMultiple方法的具體用法?PHP View::loadMultiple怎麽用?PHP View::loadMultiple使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Drupal\views\Entity\View
的用法示例。
在下文中一共展示了View::loadMultiple方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: views_post_update_taxonomy_index_tid
/**
* Fix views with dependencies on taxonomy terms that don't exist.
*/
function views_post_update_taxonomy_index_tid()
{
$views = View::loadMultiple();
array_walk($views, function (View $view) {
$old_dependencies = $view->getDependencies();
$new_dependencies = $view->calculateDependencies()->getDependencies();
if ($old_dependencies !== $new_dependencies) {
$view->save();
}
});
}
示例2: loadMultiple
/**
* {@inheritdoc}
*/
public static function loadMultiple(array $ids = NULL)
{
return View::loadMultiple($ids);
}
示例3: views_post_update_field_formatter_dependencies
/**
* Include field formatter dependencies in a view when the formatter is used.
*/
function views_post_update_field_formatter_dependencies()
{
$views = View::loadMultiple();
array_walk($views, function (View $view) {
$view->save();
});
}