* @var CRM_Core_Controller
*/
public $controller;
-
+
/**
* Api entity name
- *
+ *
* @var string
*/
public $entityName;
*/
public function addSelect($name, $props = array(), $required = FALSE) {
if (!isset($props['entity'])) {
- if(isset($this->entityName)){
+ if (isset($this->entityName)) {
$props['entity'] = $this->entityName;
}
else {
if (!$options) {
$targetField->setAttribute('placeholder', $targetField->getAttribute('data-none-prompt'));
}
- }
+ }
else {
$targetField->setAttribute('placeholder', $targetField->getAttribute('data-empty-prompt'));
$targetField->setAttribute('disabled', 'disabled');
* Check if repeating event.
*/
public $_isRepeatingEvent;
+
+ /**
+ * Explicitly declare the entity api name.
+ */
+ public $entityName = 'Event';
/**
* Set variables up before form is built.
// add event title, make required if this is not a template
$this->add('text', 'title', ts('Event Title'), $attributes['event_title'], !$this->_isTemplate);
- // We must specify the entity api name when using an addSelect
- $this->entityName = 'Event';
$this->addSelect('event_type_id',
array('onChange' => "CRM.buildCustomData( 'Event', this.value );"),
TRUE