SomeClass example



  /** * Returns the result of an autoloaded class's public method. * * @return array * Renderable array. */
  public function testClassLoading() {
    $markup = NULL;
    if (class_exists('Drupal\module_autoload_test\SomeClass')) {
      $obj = new SomeClass();
      $markup = $obj->testMethod();
    }
    return ['#markup' => $markup];
  }

}
Home | Imprint | This part of the site doesn't use cookies.