本文整理匯總了PHP中TextField::setTitle方法的典型用法代碼示例。如果您正苦於以下問題:PHP TextField::setTitle方法的具體用法?PHP TextField::setTitle怎麽用?PHP TextField::setTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TextField
的用法示例。
在下文中一共展示了TextField::setTitle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getGeoFields
/**
* @return \FieldList
*/
public function getGeoFields()
{
$fields = new FieldList();
$fields->push(new HeaderField('AddressHeader', _t('GeoMemberExtension.ADDRESSHEADER', 'Address')));
$fields->push($this->getAddressFields(), 'Address');
$fields->push(new HeaderField('GeoHeader', _t('GeoMemberExtension.GEOHEADER', 'Geo data')));
$latitude = new TextField('Latitude', _t('GeoMemberExtension.LATITUDE', 'Latitude'), $this->owner->Latitude ? $this->owner->Latitude : null);
$latitude->setAttribute('placeholder', _t('GeoMemberExtension.LATITUDE', 'Latitude'));
$latitude->setTitle('');
$longitude = new TextField('Longitude', _t('GeoMemberExtension.LONGITUDE', 'Longitude'), $this->owner->Longitude ? $this->owner->Longitude : null);
$longitude->setAttribute('placeholder', _t('GeoMemberExtension.LONGITUDE', 'Longitude'));
$longitude->setTitle('');
$coords = new FieldGroup($latitude, $longitude);
$coords->setFieldHolderTemplate('AddressFieldHolder');
$coords->setTitle(_t('GeoMemberExtension.COORDS', 'Coordinates'));
$fields->push($coords);
$fields->push(new CheckboxField('GeolocateOnLocation', _t('GeoMemberExtension.GEOLOCATEONLOCATION', 'Only show location instead of full address')));
$tz = timezone_identifiers_list();
$timezone = $this->owner->Timezone;
if (!$timezone) {
$timezone = date_default_timezone_get();
}
$fields->push($tzdd = new DropdownField('Timezone', _t('GeoMemberExtension.TIMEZONE', 'Timezone'), array_combine($tz, $tz), $timezone));
$tzdd->setEmptyString('');
return $fields;
}