src/UI/Components/AbstractUIComponent.php
public function replaceMagicFields($html)
  {
    $html = str_replace('%id%', $this->getId(), $html);
    $html = str_replace('%class%', implode(' ', $this->classes), $html);
    $html = str_replace('%style%', $this->getStyle(), $html);

    $strAttributes = '';
    foreach ($this->attributes as $key => $value) {
      $strAttributes .= ' ' . $key . '="' . $value . '"';
    }
    $html = str_replace('%attributes%', $strAttributes, $html);
    return $html;
  }
public function replaceMagicFields($html)
  {
    $html = str_replace('%id%', $this->getId(), $html);
    $html = str_replace('%class%', implode(' ', $this->classes), $html);
    $html = str_replace('%style%', $this->getStyle(), $html);

    $strAttributes = '';
    foreach ($this->attributes as $key => $value) {
      $strAttributes .= ' ' . $key . '="' . $value . '"';
    }
    $html = str_replace('%attributes%', $strAttributes, $html);
    return $html;
  }
public function replaceMagicFields ( $ html ) { $ html = str_replace ( '%id%' , $ this -> getId ( ) , $ html ) ; $ html = str_replace ( '%class%' , implode ( ' ' , $ this -> classes ) , $ html ) ; $ html = str_replace ( '%style%' , $ this -> getStyle ( ) , $ html ) ; $ strAttributes = '' ; foreach ( $ this -> attributes as $ key => $ value ) { $ strAttributes .= ' ' . $ key . '="' . $ value . '"' ; } $ html = str_replace ( '%attributes%' , $ strAttributes , $ html ) ; return $ html ; }
Remplace les champs magiques des assets - concernant uniquement les champs magiques des composants de type UI
@param  string $html  HTML à inspeter
@return string
Remplace les champs magiques des assets - concernant uniquement les champs magiques des composants de type UI