src/Cornford/Bootstrapper/BootstrapBase.php
protected function action($type, $value, array $attributes = array())
	{
		$return = '';
		$containerAttributes = $this->getContainerAttributes($attributes);

		switch ($type) {
			case 'submit':
				$attributes = array_merge(array('class' => 'btn btn-primary pull-right'), $attributes);
				break;
			case 'button':
			case 'reset':
			default:
				$attributes = array_merge(array('class' => 'btn btn-default'), $attributes);
		}

		if (!isset($containerAttributes['display'])) {
			$return .= $this->group('', null, 'form-group', $containerAttributes);
		}

		if ($this->formType == self::FORM_HORIZONTAL) {
			$return .= $this->group('', null, $this->inputClass);
		}

		$return .= $this->form->$type($value, $attributes) . "\n";

		if ($this->formType == self::FORM_HORIZONTAL) {
			$return .= '</div>' . "\n";
		}

		if (!isset($containerAttributes['display'])) {
			$return .= '</div>' . "\n";
		}

		return $return;
	}
protected function action($type, $value, array $attributes = array())
	{
		$return = '';
		$containerAttributes = $this->getContainerAttributes($attributes);

		switch ($type) {
			case 'submit':
				$attributes = array_merge(array('class' => 'btn btn-primary pull-right'), $attributes);
				break;
			case 'button':
			case 'reset':
			default:
				$attributes = array_merge(array('class' => 'btn btn-default'), $attributes);
		}

		if (!isset($containerAttributes['display'])) {
			$return .= $this->group('', null, 'form-group', $containerAttributes);
		}

		if ($this->formType == self::FORM_HORIZONTAL) {
			$return .= $this->group('', null, $this->inputClass);
		}

		$return .= $this->form->$type($value, $attributes) . "\n";

		if ($this->formType == self::FORM_HORIZONTAL) {
			$return .= '</div>' . "\n";
		}

		if (!isset($containerAttributes['display'])) {
			$return .= '</div>' . "\n";
		}

		return $return;
	}
Create a form action button.

@param string $value
@param string $type
@param array  $attributes

@return string