$url = Url::fromRoute($route_name);
$link = Link::fromTextAndUrl($text, $url);
$link = Link::createFromRoute('Link Text', 'route_name')->getUrl();
<?php | |
function peer_review_install() { | |
drupal_install_schema('peer_review'); | |
} | |
function peer_review_uninstall() { | |
drupal_uninstall_schema('peer_review'); | |
} |
// cod_session.module @ 161 | |
// If this is content-type is not unique make the widget a select list. | |
if (variable_get('cod_unique_' . $form['#node']->type, COD_SCHEDULE_SINGLE) == COD_SCHEDULE_MULTIPLE) { | |
$form['field_session_room']['#type'] = 'nodereference_select'; | |
// Keep the widget from allowing multiple values. | |
$form['#field_info']['field_session_room']['multiple'] = FALSE; | |
} |