public function label($name, $text = null, $html_attributes = array()) { if (!$text) { $text = Inflector::humanize($name); } return FormTagHelper::label_tag($this->get_field_name($name), $text, $html_attributes); }
public static function pluralize($count, $singular, $number_format = null) { $word = $count == 1 ? $singular : Inflector::pluralize($singular); return $number_format === null ? "{$count} {$word}" : sprintf($number_format, $count) . ' ' . $word; }