本文整理汇总了PHP中DataObject::getFrontEndFields方法的典型用法代码示例。如果您正苦于以下问题:PHP DataObject::getFrontEndFields方法的具体用法?PHP DataObject::getFrontEndFields怎么用?PHP DataObject::getFrontEndFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataObject
的用法示例。
在下文中一共展示了DataObject::getFrontEndFields方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFrontEndFields
function getFrontEndFields()
{
$fields = parent::getFrontEndFields();
$fields->removeByName("ParentID");
$fields->removeByName("Name");
$fields->replaceField("Title", new LiteralField("Title", "<h3>Edit the details for " . $this->Title . "</h3>"));
return $fields;
}
示例2: getFrontEndFields
/**
* Setup the fields for the frontend
* @param type $params
* @return FieldList $fields the default FieldList
*/
public function getFrontEndFields($params = null)
{
$fields = parent::getFrontEndFields($params);
$fields->removeByName(array('MD5Email', 'AkismetMarked', 'Visible', 'ShowGravatar', 'News'));
$fields->replaceField('Email', EmailField::create('Email', $this->fieldLabel('Email')));
$fields->replaceField('Comment', TextAreaField::create('Comment', $this->fieldLabel('Comment')));
$fields->fieldByName('Comment')->setColumns(20)->setRows(10);
return $fields;
}
示例3: getFrontEndFields
public function getFrontEndFields($params = null)
{
$fields = parent::getFrontEndFields($params);
$fields->replaceField('Layout', $dd = DropdownField::create('Layout', null, self::$layouts));
$dd->setHasEmptyDefault(true);
$fields->removeByName('InheritPerms');
$fields->removeByName('OwnerID');
// $fields->removeByName('PublicAccess');
return $fields;
}
示例4: getFrontEndFields
public function getFrontEndFields($params = null)
{
$fields = parent::getFrontEndFields($params);
$fields->removeByName("Identifier");
$fields->removeByName("ParentID");
$fields->removeByName("Name");
$fields->unshift(self::dropdown("Identifier", "Network"));
$this->extend('updateFrontEndFields', $fields);
return $fields;
}
示例5: getFrontEndFields
/**
* Return fields that should be visible to the user
* on the front end. These are scaffolded fields
* with some inappropriate fields removed.
*
* @return object FieldSet object
*/
public function getFrontEndFields()
{
$fields = parent::getFrontEndFields();
$fields->removeByName('Weight');
$fields->removeByName('Version');
$fields->removeByName('ProductID');
foreach ($fields as $field) {
$field->setValue($this->getField($field->Name()));
}
return $fields;
}
示例6: getFrontEndFields
public function getFrontEndFields($params = null)
{
$fields = parent::getFrontEndFields($params);
$exludes = array("BouncedCount", "Blacklisted", "ReceivedCount", "ValidateHash", "ValidateHashExpired", "Verified");
foreach ($exludes as $exclude) {
$fields->removeByName($exclude);
}
return $fields;
}
示例7: getFrontEndFields
public function getFrontEndFields($params = null)
{
$fields = parent::getFrontEndFields($params);
$this->updateFields($fields);
return $fields;
}