/** * @param Supervisor $supervisor * @param string $path * @param array $token */ public function __construct(Supervisor $supervisor, $path, array $token = []) { $node = $supervisor->createNode($path, $token); $supervisor = $node->supervisor(); if ($supervisor instanceof Supervisor) { $this->importers = $supervisor->getImporters(); } }
/** * Create placeholder block (to be injected with inner blocks defined in context). * * @param string $name * @param string $blockID * @return string */ protected function createPlaceholder($name, &$blockID) { $blockID = $name . '-' . $this->supervisor->uniquePlaceholder(); //Short block declaration syntax return '${' . $blockID . '}'; }