public static function getExtensionRoot($directory) {
    $extension_root = FALSE;
    for ($i = 1; $i <= 5; $i++) {
      $info_file = $directory . '/' . basename($directory) . '.info';
      if ((file_exists($info_file) && basename($directory) !== 'drush') || file_exists($info_file . '.yml')) {
        $extension_root = $directory;
        break;
      }
      $directory = dirname($directory);
    }
    return $extension_root;
  }
public static function getExtensionRoot($directory) {
    $extension_root = FALSE;
    for ($i = 1; $i <= 5; $i++) {
      $info_file = $directory . '/' . basename($directory) . '.info';
      if ((file_exists($info_file) && basename($directory) !== 'drush') || file_exists($info_file . '.yml')) {
        $extension_root = $directory;
        break;
      }
      $directory = dirname($directory);
    }
    return $extension_root;
  }
public static function getExtensionRoot ( $ directory ) { $ extension_root = FALSE ; for ( $ i = 1 ; $ i <= 5 ; $ i ++ ) { $ info_file = $ directory . '/' . basename ( $ directory ) . '.info' ; if ( ( file_exists ( $ info_file ) && basename ( $ directory ) !== 'drush' ) || file_exists ( $ info_file . '.yml' ) ) { $ extension_root = $ directory ; break ; } $ directory = dirname ( $ directory ) ; } return $ extension_root ; }
Returns extension root.

@return string|bool
Extension root directory or false if it was not found.
Returns extension root .