use Drupal\Core\Render\Element\Link;
use Drupal\Core\Render\Markup;
use Drupal\Core\StringTranslation\TranslatableMarkup;
-use Drupal\Core\PhpStorage\PhpStorageFactory;
use Drupal\Core\StringTranslation\PluralTranslatableMarkup;
use Drupal\Core\Render\BubbleableMetadata;
use Drupal\Core\Render\Element;
*
* Correct:
* @code
- * $my_substring = Unicode::substr($original_string, 0, 5);
+ * $my_substring = mb_substr($original_string, 0, 5);
* @endcode
*
* @}
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use UrlHelper::stripDangerousProtocols() or UrlHelper::filterBadProtocol()
* instead. UrlHelper::stripDangerousProtocols() can be used in conjunction
- * with \Drupal\Component\Utility\SafeMarkup::format() and an @variable
+ * with \Drupal\Component\Render\FormattableMarkup and an @variable
* placeholder which will perform the necessary escaping.
* UrlHelper::filterBadProtocol() is functionality equivalent to check_url()
* apart from the fact it is protected from double escaping bugs. Note that
/**
* Returns the base URL path (i.e., directory) of the Drupal installation.
*
- * base_path() adds a "/" to the beginning and end of the returned path if the
- * path is not empty. At the very least, this will return "/".
+ * Function base_path() adds a "/" to the beginning and end of the returned path
+ * if the path is not empty. At the very least, this will return "/".
*
* Examples:
* - http://example.com returns "/" because the path is empty.
* 'id' => 'my-module-table',
* ),
* );
- * return drupal_render($table);
+ * return \Drupal::service('renderer')->render($table);
* @endcode
*
* In the theme function for the form, a special class must be added to each
'subgroup' => NULL,
'source' => NULL,
'hidden' => TRUE,
- 'limit' => 0
+ 'limit' => 0,
];
$group = $options['group'];
* rendering when possible or loop through the elements and render them as
* they are available.
*
- * @see drupal_render()
+ * @see \Drupal\Core\Render\RendererInterface::render()
* @see https://www.drupal.org/node/2912757
*/
function drupal_render_children(&$element, $children_keys = NULL) {
\Drupal::service('kernel')->invalidateContainer();
// Wipe the Twig PHP Storage cache.
- PhpStorageFactory::get('twig')->deleteAll();
+ \Drupal::service('twig')->invalidate();
// Rebuild module and theme data.
$module_data = system_rebuild_module_data();