You are here

public function RouteWrapper::getDefaultTask in Drupal 7 to 8/9 Module Upgrader 8

Gets the closest default local task, if there is one.

Return value

static|null

File

src/Routing/Drupal7/RouteWrapper.php, line 183

Class

RouteWrapper
Encapsulates a Drupal 7 route (including the link, if any).

Namespace

Drupal\drupalmoduleupgrader\Routing\Drupal7

Code

public function getDefaultTask() {
  if ($this
    ->hasSiblings()) {
    return $this
      ->getSiblings()
      ->ofType('MENU_DEFAULT_LOCAL_TASK')
      ->first();
  }
}