Ejemplo n.º 1
0
 function GetError(array $params = array())
 {
     $allParams = array_merge($params, $this->ErrorParams());
     if ($this->error) {
         return Worder::ReplaceArgs($this->errorLabelPrefix . $this->error, $allParams);
     }
     return '';
 }
Ejemplo n.º 2
0
 private function InitTexts()
 {
     $translator = PhpTranslator::Singleton();
     $translator->SetLanguage('en');
     $translator->AddTranslation('en', 'Phine.Installer.StatusDescription.Table_{0}.Total_{1}', 'Creating Database Model {0} of {1}');
     $translator->AddTranslation('en', 'Phine.Installer.StatusDescription.Sql_{0}.Total_{1}', 'Executing Bundle SQL {0} of {1}');
     Worder::SetDefaultRealizer($translator);
 }
Ejemplo n.º 3
0
 /**
  * 
  * @param type $progress
  * @param type $progressCount
  */
 function Report($progress, $progressCount)
 {
     $this->data['progress'] = $progress;
     $this->data['progressCount'] = $progressCount;
     if ($this->descriptionLabel) {
         $this->data['progressDescription'] = Worder::ReplaceArgs($this->descriptionLabel, array($progress, $progressCount));
     }
     IO\File::CreateWithText($this->targetFile, json_encode($this->data));
 }
Ejemplo n.º 4
0
function TransArgs($string, array $args)
{
    return Worder::ReplaceArgs($string, $args);
}
Ejemplo n.º 5
0
 /**
  * Sets a translatable attribute ofe the field to a default placeholder
  * @param string $name The field name
  * @param string $attribute The attribute name
  */
 protected function SetTransAttribute($name, $attribute)
 {
     $field = $this->GetElement($name);
     $field->SetHtmlAttribute($attribute, Worder::Replace($this->AttributePlaceholder($name, $attribute)));
 }