Created
January 8, 2010 13:21
-
-
Save Palleas/272044 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
*/ | |
class noeWidgetFormTextarea extends sfWidgetFormTextarea | |
{ | |
const CUSTOM_ATTRIBUTES_KEY = 'fieldAttributes'; | |
public function render($name, $value = null, $attributes = array(), $errors = array()) | |
{ | |
if ($this->hasCustomFieldAttributes()) | |
{ | |
$this->setAttribute('class', 'use_tinyMCE'); | |
} | |
return parent::render($name, $value, $attributes, $errors); | |
} | |
protected function hasCustomFieldAttributes() | |
{ | |
return !is_null($this->getAttribute(self::CUSTOM_ATTRIBUTES_KEY)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment