Exemplo n.º 1
0
 public function filter(Application $app, Response $resp)
 {
     if ($resp instanceof TransientResponse) {
         if ($resp->getTemplate()->hasBlock($this->block)) {
             $this->injectLocalizations();
         }
     }
 }
Exemplo n.º 2
0
 /**
  * [ 'key' => 'foo', 'value' => 'bar' ] => [ 'foo' => 'bar' ]
  * [ 'key' => 'foo', 'value' => 'bar', 'value2' => 'baz' ] => [ 'foo' => [ 'value' => 'bar', 'value2' => 'baz' ] ]
  */
 public function filter(Application $app, Response $resp)
 {
     if ($resp instanceof TransientResponse) {
         if ($resp->getTemplate()->hasBlock($this->block)) {
             $app[$this->block] = $this->getSet();
         }
     }
 }