public function sign($form = null) {
		$form = $form ?: $this->_context->form;

		if (isset($state[spl_object_hash($form)])) {
			return;
		}

		Filters::apply($form, 'create', function($params, $next) use ($form) {
			$this->_state[spl_object_hash($form)] = [
				'fields' => [],
				'locked' => [],
				'excluded' => []
			];
			return $next($params);
		});

		Filters::apply($form, 'end', function($params, $next) use ($form) {
			$id = spl_object_hash($form);

			if (!$this->_state[$id]) {
				return $next($params);
			}
			$formSignature = $this->_classes['formSignature'];

			$value = $formSignature::key($this->_state[$id]);
			echo $form->hidden('security.signature', compact('value'));

			$this->_state[$id] = [];
			return $next($params);
		});

		Filters::apply($form, '_defaults', function($params, $next) use ($form) {
			$defaults = [
				'locked' => ($params['method'] === 'hidden' && $params['name'] !== '_method'),
				'exclude' => $params['name'] === '_method'
			];
			$options = $params['options'];

			$options += $defaults;
			$params['options'] = array_diff_key($options, $defaults);
			$result = $next($params);

			if ($params['method'] === 'label') {
				return $result;
			}
			$value = isset($params['options']['value']) ? $params['options']['value'] : "";

			$type = [
				$options['exclude']  => 'excluded',
				!$options['exclude'] => 'fields',
				$options['locked']   => 'locked'
			];
			if (!$name = preg_replace('/(\.\d+)+$/', '', $params['name'])) {
				return $result;
			}
			$this->_state[spl_object_hash($form)][$type[true]][$name] = $value;
			return $result;
		});
	}