/** * * * @param mixed $resource * @param string $action * @param array $options * * @return */ static function form_for($resource = null, $action = null, array $options = array()) { if (!is_null(self::$_instance)) { self::$_instance = null; return ob_get_clean(); } self::$_instance = new Helpers_Form($resource, $action, $options); ob_start(); return self::$_instance; }
<?php echo $form->text_field('title'); ?> <?php echo $form->label('content'); ?> <br /> <?php echo $form->text_area('content', array('cols' => 50, 'rows' => 4)); ?> <?php echo $form->label('author'); ?> <br /> <?php echo $form->text_area('author', array('class' => 'author-input')); ?> <?php echo $form->label('is_publish'); ?> <br /> <?php echo $form->text_area('is_publish', array('check_value' => 'yes', 'uncheck_value' => 'no')); ?> <?php Helpers_Form::end_form_for();