Example #1
0
 /**
  * Put some additional code - namespaces,
  * additional code after body tag or before closing body tag.
  */
 public function onAfterRender()
 {
     // Check for restrictions
     if ($this->isRestricted()) {
         return;
     }
     // Get document buffer
     $buffer = $this->app->getBody();
     switch ($this->params->get('tags_position', 0)) {
         case 1:
             $buffer = $this->putAfterHead($buffer);
             break;
         case 2:
             $buffer = $this->putAfterTitle($buffer);
             break;
     }
     // Put open graph namespace in the HTML element
     $buffer = $this->putNamespaces($buffer, $this->params);
     // Add code after body tag and before closing body tag
     $buffer = $this->putAdditionalCode($buffer);
     $this->app->setBody($buffer);
 }