本文整理汇总了PHP中FieldGroup::FieldHolder方法的典型用法代码示例。如果您正苦于以下问题:PHP FieldGroup::FieldHolder方法的具体用法?PHP FieldGroup::FieldHolder怎么用?PHP FieldGroup::FieldHolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FieldGroup
的用法示例。
在下文中一共展示了FieldGroup::FieldHolder方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SearchForm
function SearchForm()
{
$query = isset($_GET['CommentSearch']) ? $_GET['CommentSearch'] : null;
$searchFields = new FieldGroup(new TextField('CommentSearch', _t('CommentTableField.SEARCH', 'Search'), $query), new HiddenField("ctf[ID]", '', $this->mode), new HiddenField('CommentFieldName', '', $this->name));
$actionFields = new LiteralField('CommentFilterButton', '<input type="submit" name="CommentFilterButton" value="' . _t('CommentTableField.FILTER', 'Filter') . '" id="CommentFilterButton"/>');
$fieldContainer = new FieldGroup($searchFields, $actionFields);
return $fieldContainer->FieldHolder();
}
示例2: FieldHolder
public function FieldHolder()
{
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-metadata/jquery.metadata.js');
Requirements::javascript('dataobject_manager/code/dropdown_fields/javascript/filtered_dropdown_set.js');
foreach ($this->children as $child) {
$meta = "'updateLink': '" . $this->Link('update') . "'";
if ($str = $child->getEmptyString()) {
$meta .= ",'emptyString': '" . $child->getEmptyString() . "'";
}
$child->addExtraClass("{" . $meta . "}");
}
return parent::FieldHolder();
}
示例3: FieldHolder
public function FieldHolder($properties = array())
{
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-metadata/jquery.metadata.js');
//Requirements::javascript(MAPPABLE_MODULE_PATH.'/javascript/mapField.js');
$js = '
<script type="text/javascript">
var latFieldName = "' . $this->latField . '";
var lonFieldName = "' . $this->longField . '";
var zoomFieldName = "' . $this->zoomField . '";
</script>
';
Requirements::javascript(MAPPABLE_MODULE_PATH . '/javascript/mapField.js');
$attributes = array('class' => 'editableMap', 'id' => 'GoogleMap', 'data-LatFieldName' => $this->latField, 'data-LonFieldName' => $this->longField, 'data-ZoomFieldName' => $this->zoomField, 'data-UseMapBounds' => false);
Requirements::css('mappable/css/mapField.css');
$guidePointsJSON = '';
if (isset($this->guidePoints)) {
$latlongps = array();
foreach ($this->guidePoints as $guidepoint) {
array_push($latlongps, array('latitude' => $guidepoint->Lat, 'longitude' => $guidepoint->Lon));
}
$guidePointsJSON = json_encode($latlongps);
// convert the mappable guidepoints to lat lon
$attributes['data-GuidePoints'] = $guidePointsJSON;
// we only wish to change the bounds to those of all the points iff
// the item currently has no location
$attributes['data-useMapBounds'] = true;
}
$content = '<div class="editableMapWrapper">' . $this->createTag("div", $attributes) . '</div>';
$this->FieldList()->push(new LiteralField('locationEditor', $content));
$content2 = '<div id="mapSearch">
<input name="location_search" id="location_search" size=80/>
<button class="action" id="searchLocationButton">Search Location Name</button>
<div id="mapSearchResults">
</div>
</div>
';
$this->FieldList()->push(new LiteralField('mapSearch', $content2));
return parent::FieldHolder();
}
示例4: SearchForm
/**
* Provide some HTML for a search form, to be
* added above the AssetTable field, allowing
* a user to filter the current table's files
* by their filename.
*
* @return string HTML for search form
*/
function SearchForm() {
$searchFields = new FieldGroup(
new TextField('FileSearch', _t('MemberTableField.SEARCH', 'Search'), $this->searchingFor),
new HiddenField("ctf[ID]", '', $this->ID),
new HiddenField('FileFieldName', '', $this->name)
);
$actionFields = new LiteralField(
'FileFilterButton',
'<input type="submit" class="action" name="FileFilterButton" value="' . _t('MemberTableField.FILTER', 'Filter') . '" id="FileFilterButton"/>'
);
$fieldContainer = new FieldGroup(
$searchFields,
$actionFields
);
return $fieldContainer->FieldHolder();
}
示例5: FieldHolder
public function FieldHolder()
{
$addForm = new FieldGroup(array($textField = new TextField($this->Name() . '_quickAdd', $this->addTitle), new LiteralField('', '<a class="quickadd" href="#">Add +</a>')));
$textField->addExtraClass('quickadd');
return '<div class="quickAddHolder">' . parent::FieldHolder() . $addForm->FieldHolder() . '</div>';
}
示例6: SearchForm
function SearchForm()
{
$groupID = isset($this->group) ? $this->group->ID : 0;
$query = isset($_GET['MemberSearch']) ? $_GET['MemberSearch'] : null;
$searchFields = new FieldGroup(new TextField('MemberSearch', _t('MemberTableField.SEARCH', 'Search'), $query), new HiddenField("ctf[ID]", '', $groupID), new HiddenField('MemberFieldName', '', $this->name), new HiddenField('MemberDontShowPassword', '', $this->hidePassword));
$actionFields = new LiteralField('MemberFilterButton', '<input type="submit" class="action" name="MemberFilterButton" value="' . _t('MemberTableField.FILTER', 'Filter') . '" id="MemberFilterButton"/>');
$fieldContainer = new FieldGroup($searchFields, $actionFields);
return $fieldContainer->FieldHolder();
}
示例7: SearchForm
/**
* Provide some HTML for a search form, to be
* added above the AssetTable field, allowing
* a user to filter the current table's files
* by their filename.
*
* @return string HTML for search form
*/
function SearchForm()
{
$fieldContainer = new FieldGroup(new FieldGroup(new TextField('FileSearch', _t('MemberTableField.SEARCH', 'Search'), $this->searchingFor)), new FieldGroup($btnFilter = new InlineFormAction('FileFilterButton', _t('MemberTableField.FILTER', 'Filter')), $btnClear = new InlineFormAction('FileFilterClearButton', _t('AssetTableField.CLEAR', 'Clear'))));
$btnFilter->includeDefaultJS(false);
$btnClear->includeDefaultJS(false);
return $fieldContainer->FieldHolder();
}
示例8: SearchForm
function SearchForm()
{
$searchFields = new FieldGroup(new TextField('MemberSearch', _t('MemberTableField.SEARCH', 'Search')), new HiddenField("ctf[ID]", '', $this->group->ID), new HiddenField('MemberFieldName', '', $this->name), new HiddenField('MemberDontShowPassword', '', $this->hidePassword));
$orderByFields = new FieldGroup(new LabelField(_t('MemberTableField.ORDERBY', 'Order by')), new FieldSet(new DropdownField('MemberOrderByField', '', array('FirstName' => _t('MemberTableField.FIRSTNAME', 'FirstName'), 'Surname' => _t('MemberTableField.SURNAME', 'Surname'), 'Email' => _t('MemberTableField.EMAIL', 'Email'))), new DropdownField('MemberOrderByOrder', '', array('ASC' => _t('MemberTableField.ASC', 'Ascending'), 'DESC' => _t('MemberTableField.DESC', 'Descending')))));
$groups = DataObject::get('Group');
$groupArray = array('' => _t('MemberTableField.ANYGROUP', 'Any group'));
foreach ($groups as $group) {
$groupArray[$group->ID] = $group->Title;
}
$groupFields = new DropdownField('MemberGroup', _t('MemberTableField.FILTERBYGROUP', 'Filter by group'), $groupArray);
$actionFields = new LiteralField('MemberFilterButton', '<input type="submit" class="action" name="MemberFilterButton" value="' . _t('MemberTableField.FILTER', 'Filter') . '" id="MemberFilterButton"/>');
$fieldContainer = new FieldGroup($searchFields, $actionFields);
return $fieldContainer->FieldHolder();
}
示例9: OrderByField
function OrderByField()
{
$fields = new FieldGroup(new DropdownField('MemberListOrderByField', '', array('FirstName' => _t('MemberList.FN', 'FirstName'), 'Surname' => _t('MemberList.SN', 'Surname'), 'Email' => _t('MemberList.EMAIL', 'Email'))), new DropdownField('MemberListOrderByOrder', '', array('ASC' => _t('MemberList.ASC', 'Ascending'), 'DESC' => _t('MemberList.DESC', 'Descending'))));
$field = new FieldGroup(new LabelField(_t('MemberList.ORDERBY', 'Order by')), $fields);
return $field->FieldHolder();
}
示例10: FieldHolder
/**
* Just includes the CSS used for layout
*/
function FieldHolder($properties = array())
{
Requirements::css(basename(dirname(__DIR__)) . '/css/TextFieldGroup.css');
return parent::FieldHolder($properties);
}