By editor, 30 September, 2016 Create HTML Table. render and theming Tags Drupal 8 Code Theming Example : Table. $header = ['#','Name', 'Mail']; $data = [ [1,'Name 1', 'Mail1@example.com'], [2,'Name NĀ°2', 'second@example.com'], ];
By editor, 29 September, 2016 Execute a drush command programmatically Tags Drupal 8 Code Drush Drupal 7 Methodes: drush_invoke (For the current site) drush_invoke($command, $arguments = array()); drush_invoke_process This creates a new process in a new Drupal instance. There for you must specify the site alias.
By editor, 27 September, 2016 Get Theme details (Name, Regions, Libraries ...) Tags Drupal 8 Code Theming Get current theme. $theme = \Drupal::theme()->getActiveTheme(); Theme name: $theme_name = \Drupal::theme()->getActiveTheme()->getName();
By editor, 26 September, 2016 Drupal 8 breadcrumb functions (menu_get_active_trail, and menu_link_get_preferred ...) Tags Drupal 8 Code Those functions [ menu_set_active_item(), menu_set_active_trail(), menu_get_active_trail(), menu_link_get_preferred() ] are removed on D8 and replaces with drupal 8 service. You can use following example to get data and to edit. Example :