Contao\Controller::replaceInsertTags PHP Method

replaceInsertTags() public static method

Replace insert tags with their values
public static replaceInsertTags ( string $strBuffer, boolean $blnCache = true ) : string
$strBuffer string The text with the tags to be replaced
$blnCache boolean If false, non-cacheable tags will be replaced
return string The text with the replaced tags
    public static function replaceInsertTags($strBuffer, $blnCache = true)
    {
        $objIt = new InsertTags();
        return $objIt->replace($strBuffer, $blnCache);
    }

Usage Example

 /**
  * Gets the label for a language, optionally replacing insert tags.
  *
  * @param string $language
  * @param bool   $replaceInsertTags
  *
  * @return string
  */
 public function get($language, $replaceInsertTags = true)
 {
     $language = strtolower($language);
     if (empty($this->map[$language])) {
         return strtoupper($language);
     }
     $value = $this->map[$language];
     if ($replaceInsertTags) {
         $value = Controller::replaceInsertTags($value);
     }
     return $value;
 }
All Usage Examples Of Contao\Controller::replaceInsertTags