class FlexiformElementEntityProperty_date in Flexiform 7
@file Contains FlexiformElementEntityProperty_date.
Hierarchy
- class \FlexiformElement implements FlexiformElementInterface
Expanded class hierarchy of FlexiformElementEntityProperty_date
File
- includes/
element/ property/ date.property.element.inc, line 7 - Contains FlexiformElementEntityProperty_date.
View source
class FlexiformElementEntityProperty_date extends FlexiformElementEntityProperty {
public function form($form, &$form_state, $entity, $language = LANGUAGE_NONE) {
$form = parent::form($form, $form_state, $entity, $language);
if (module_exists('date_popup')) {
$form[$this->element_namespace]['#type'] = 'date_popup';
$form[$this->element_namespace]['#date_format'] = 'M d Y H:i';
if ($default = $form[$this->element_namespace]['#default_value']) {
$form[$this->element_namespace]['#default_value'] = date('Y-m-d H:i', $form[$this->element_namespace]['#default_value']);
}
}
return $form;
}
public function formExtractValues($form, &$form_state, $entity) {
$value = parent::formExtractValues($form, $form_state, $entity);
return strtotime($value);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FlexiformElement:: |
protected | property | The bundle this is on. | |
FlexiformElement:: |
protected | property | The namespace of this element. | |
FlexiformElement:: |
protected | property | The entity namespace of the entity this element is acting on. | |
FlexiformElement:: |
protected | property | The entity type this field is on. | |
FlexiformElement:: |
protected | property | The flexiform entity this element is one. | |
FlexiformElement:: |
protected | property | The settings for this element. | |
FlexiformElement:: |
protected | property | The weight of this element. | |
FlexiformElement:: |
public | function | Validate the configure form for the element. | 3 |
FlexiformElement:: |
public static | function | Create an element object. | |
FlexiformElement:: |
public | function | Work out if the submitted value constitutes empty. | 1 |
FlexiformElement:: |
public | function | Get an array of ctools context for the flexiform. | |
FlexiformElement:: |
public | function | Build a list of possible ctools substitutions. | |
FlexiformElement:: |
public static | function | Get an element object. | |
FlexiformElement:: |
public | function | Get the element namespace for this form element. | |
FlexiformElement:: |
public | function | Get the entity namespace for this form element. | |
FlexiformElement:: |
public | function | Get the entity type for this element. | |
FlexiformElement:: |
public | function | Get the settings. | |
FlexiformElement:: |
public | function | Get the weight of this form element. | |
FlexiformElement:: |
public | function | Get the label for this form element. | 2 |
FlexiformElement:: |
public | function | Make namespace for the element. | 1 |
FlexiformElement:: |
public | function | Get the name for this form element. | |
FlexiformElement:: |
public | function | Build the remove form for the element. | |
FlexiformElement:: |
public | function | Submit the remove form for the element. | |
FlexiformElement:: |
public | function | Validate the remove form for the element. | |
FlexiformElement:: |
public | function | Replace ctools substitutions with their values. | |
FlexiformElement:: |
public | function | Set the label for this form element. | 1 |
FlexiformElement:: |
public | function | Set the weight of this form element. | 1 |
FlexiformElement:: |
public | function | Convert this object into a settings array. | 5 |
FlexiformElement:: |
public | function | Get the type of this form element. | 3 |
FlexiformElementEntityProperty:: |
protected | property | The data type of the info. | |
FlexiformElementEntityProperty:: |
protected | property | Is this property a list. | |
FlexiformElementEntityProperty:: |
protected | property | Property Name. | |
FlexiformElementEntityProperty:: |
protected | property | The property info. | |
FlexiformElementEntityProperty:: |
public | function |
Build the configure form for the element. Overrides FlexiformElement:: |
|
FlexiformElementEntityProperty:: |
public | function |
Submit the configure form for the element. Overrides FlexiformElement:: |
|
FlexiformElementEntityProperty:: |
public | function |
Submit the form element. Overrides FlexiformElement:: |
|
FlexiformElementEntityProperty:: |
public | function |
Validate the form element. Overrides FlexiformElement:: |
|
FlexiformElementEntityProperty:: |
public | function | Return the property wrapper. | |
FlexiformElementEntityProperty:: |
public | function | Return the wrapper for the entity. | |
FlexiformElementEntityProperty:: |
public | function |
Overrides FlexiformElement::__construct(). Overrides FlexiformElement:: |
|
FlexiformElementEntityProperty_date:: |
public | function |
Return the form element for this FlexiformElement. Overrides FlexiformElementEntityProperty:: |
|
FlexiformElementEntityProperty_date:: |
public | function |
Extract the submitted values for this form element. Overrides FlexiformElementEntityProperty:: |