rest_menu_items.install in Rest menu items 8.2
File
rest_menu_items.install
View source
<?php
use Drupal\Core\Link;
use Drupal\Core\Url;
function rest_menu_items_install() {
$settings_link = Link::fromTextAndUrl(t('here'), Url::fromRoute('rest_menu_items.config_form'))
->toString();
\Drupal::messenger()
->addMessage(t('Click @link to configure Rest Menu Items!', array(
'@link' => $settings_link,
)));
}
function rest_menu_items_update_8200() {
$config_factory = \Drupal::configFactory();
$config = $config_factory
->getEditable('rest_menu_items.config');
$config
->set('output_values', [
'key',
'title',
'description',
'uri',
'alias',
'external',
'absolute',
'relative',
'existing',
'weight',
'expanded',
'enabled',
'uuid',
'options',
]);
$config
->save(TRUE);
}