Exemplo n.º 1
0
 public function onChange($resource, $path, OutputInterface $output, PageGenerator $generator)
 {
     $output->writeln(sprintf('%s modified', $path));
     $generator->load();
     $affectedPages = $generator->generatePagesByResourcePath($path);
     if (count($affectedPages) > 0) {
         foreach ($affectedPages as $page) {
             $output->writeln(sprintf('%s generated', $page->getPath()));
         }
     }
 }
Exemplo n.º 2
0
 /**
  * @return string
  */
 public function getPath()
 {
     return $this->pageGenerator->getDistDir() . $this->getUrl();
 }