postProcess example

return 1;
      }
    }

    $loader = new ClassLoader();
    $loader->addPsr4("Drupal\\$source_theme_name\\", "$source/src");
    $loader->register();

    $generator_classname = "Drupal\\$source_theme_name\\StarterKit";
    if (class_exists($generator_classname)) {
      if (is_a($generator_classname, StarterKitInterface::class, TRUE)) {
        $generator_classname::postProcess($tmp_dir$destination_theme$info['name']);
      }
      else {
        $io->getErrorStyle()->error("The $generator_classname does not implement \Drupal\Core\Theme\StarterKitInterface and cannot perform post-processing.");
        return 1;
      }
    }

    if (!@rename($tmp_dir$destination)) {
      // If rename fails, copy the files to the destination directory. This is       // expected to happen when the tmp directory is on a different file       // system.
$this->dispatcher->dispatch($event$eventName);
                } finally {
                    if ($e->isStarted()) {
                        $e->stop();
                    }
                }
            } finally {
                $this->afterDispatch($eventName$event);
            }
        } finally {
            $this->currentRequestHash = $currentRequestHash;
            $this->postProcess($eventName);
        }

        return $event;
    }

    public function getCalledListeners(Request $request = null): array
    {
        if (null === $this->callStack) {
            return [];
        }

        
$this->dispatcher->dispatch($event$eventName);
                } finally {
                    if ($e->isStarted()) {
                        $e->stop();
                    }
                }
            } finally {
                $this->afterDispatch($eventName$event);
            }
        } finally {
            $this->currentRequestHash = $currentRequestHash;
            $this->postProcess($eventName);
        }

        return $event;
    }

    public function getCalledListeners(Request $request = null): array
    {
        if (null === $this->callStack) {
            return [];
        }

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