public function field($name, array $options = []) {
		$options += [
			'features' => null,
			'size' => 'beta',
			'help' => true
		];
		$classes = [];

		$classes[] = 'use-editor';
		$classes[] = 'editor-size--' . $options['size'];

		if (is_string($options['features'])) {
			$options['features'] = Settings::read('editor.features.' . $options['features']);
		}
		foreach ($options['features'] as $feature) {
			$classes[] = 'editor-' . $feature;
		}

		$options['type'] = 'textarea';
		$options['wrap'] = ['class' => implode(' ', $classes)];
		unset($options['features']);
		unset($options['size']);

		// We must preprocess the value, as inline media might change its
		// URLs. This happens when versions are regenerated.
		//
		// Invalid media URLs are not really a problem as the media ID
		// is dictating what is been display in the app part.
		//
		// @see lithium\template\helper\Form::_defaults()
		if (!empty($options['value'])) {
			$value = $options['value'];
		} else {
			$value = $this->_context->form->binding($name)->data;
		}
		$value = $this->parse($value, [
			'mediaVersion' => 'fix2admin'
		]);

		$html  = $this->_context->form->field($name, compact('value') + $options);

		if ($options['help']) {
			extract(Message::aliases());
			// Insert *into* fields array by replacing last closing div.
			$help = '<div class="help">' . $t('ENTER for paragraphs, SHIFT+ENTER for hard line breaks', ['scope' => 'cms_core']). '</div>';
			$html = str_replace('</div>', $help . '</div>', $html);
		}
		return $html;
	}
public function field($name, array $options = []) {
		$options += [
			'features' => null,
			'size' => 'beta',
			'help' => true
		];
		$classes = [];

		$classes[] = 'use-editor';
		$classes[] = 'editor-size--' . $options['size'];

		if (is_string($options['features'])) {
			$options['features'] = Settings::read('editor.features.' . $options['features']);
		}
		foreach ($options['features'] as $feature) {
			$classes[] = 'editor-' . $feature;
		}

		$options['type'] = 'textarea';
		$options['wrap'] = ['class' => implode(' ', $classes)];
		unset($options['features']);
		unset($options['size']);

		// We must preprocess the value, as inline media might change its
		// URLs. This happens when versions are regenerated.
		//
		// Invalid media URLs are not really a problem as the media ID
		// is dictating what is been display in the app part.
		//
		// @see lithium\template\helper\Form::_defaults()
		if (!empty($options['value'])) {
			$value = $options['value'];
		} else {
			$value = $this->_context->form->binding($name)->data;
		}
		$value = $this->parse($value, [
			'mediaVersion' => 'fix2admin'
		]);

		$html  = $this->_context->form->field($name, compact('value') + $options);

		if ($options['help']) {
			extract(Message::aliases());
			// Insert *into* fields array by replacing last closing div.
			$help = '<div class="help">' . $t('ENTER for paragraphs, SHIFT+ENTER for hard line breaks', ['scope' => 'cms_core']). '</div>';
			$html = str_replace('</div>', $help . '</div>', $html);
		}
		return $html;
	}
public function field ( $ name , array $ options = [ ] ) { $ options += [ 'features' => null , 'size' => 'beta' , 'help' => true ] ; $ classes = [ ] ; $ classes [ ] = 'use-editor' ; $ classes [ ] = 'editor-size--' . $ options [ 'size' ] ; if ( is_string ( $ options [ 'features' ] ) ) { $ options [ 'features' ] = Settings :: read ( 'editor.features.' . $ options [ 'features' ] ) ; } foreach ( $ options [ 'features' ] as $ feature ) { $ classes [ ] = 'editor-' . $ feature ; } $ options [ 'type' ] = 'textarea' ; $ options [ 'wrap' ] = [ 'class' => implode ( ' ' , $ classes ) ] ; unset ( $ options [ 'features' ] ) ; unset ( $ options [ 'size' ] ) ; // We must preprocess the value, as inline media might change its // URLs. This happens when versions are regenerated. // // Invalid media URLs are not really a problem as the media ID // is dictating what is been display in the app part. // // @see lithium\template\helper\Form::_defaults() if ( ! empty ( $ options [ 'value' ] ) ) { $ value = $ options [ 'value' ] ; } else { $ value = $ this -> _context -> form -> binding ( $ name ) -> data ; } $ value = $ this -> parse ( $ value , [ 'mediaVersion' => 'fix2admin' ] ) ; $ html = $ this -> _context -> form -> field ( $ name , compact ( 'value' ) + $ options ) ; if ( $ options [ 'help' ] ) { extract ( Message :: aliases ( ) ) ; // Insert *into* fields array by replacing last closing div. $ help = '<div class="help">' . $ t ( 'ENTER for paragraphs, SHIFT+ENTER for hard line breaks' , [ 'scope' => 'cms_core' ] ) . '</div>' ; $ html = str_replace ( '</div>' , $ help . '</div>' , $ html ) ; } return $ html ; }
as `features`.
as features .