mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
MINOR Overriding methods must have the same signature declaration as the parent class due to E_STRICT.
This commit is contained in:
parent
816edabd3f
commit
958d49556d
@ -13,7 +13,7 @@ class FieldEditor extends FormField {
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public function FieldHolder() {
|
||||
public function FieldHolder($properties = array()) {
|
||||
return $this->renderWith("FieldEditor");
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ class FieldEditor extends FormField {
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canEdit() {
|
||||
public function canEdit($member = null) {
|
||||
if($this->readonly) return false;
|
||||
|
||||
return $this->form->getRecord()->canEdit();
|
||||
@ -35,7 +35,7 @@ class FieldEditor extends FormField {
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canDelete() {
|
||||
public function canDelete($member = null) {
|
||||
if($this->readonly) return false;
|
||||
|
||||
return $this->form->getRecord()->canEdit();
|
||||
@ -117,7 +117,7 @@ class FieldEditor extends FormField {
|
||||
*
|
||||
* @param DataObject Record to Save it In
|
||||
*/
|
||||
public function saveInto(DataObject $record) {
|
||||
public function saveInto(DataObjectInterface $record) {
|
||||
$name = $this->name;
|
||||
$fieldSet = $record->$name();
|
||||
|
||||
|
@ -879,11 +879,11 @@ class UserDefinedForm_EmailRecipient extends DataObject {
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public function canEdit() {
|
||||
public function canEdit($member = null) {
|
||||
return $this->Form()->canEdit();
|
||||
}
|
||||
|
||||
public function canDelete() {
|
||||
public function canDelete($member = null) {
|
||||
return $this->Form()->canDelete();
|
||||
}
|
||||
}
|
||||
|
@ -75,8 +75,8 @@ class EditableFormField extends DataObject {
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canDelete() {
|
||||
return ($this->Parent()->canEdit() && !$this->isReadonly());
|
||||
public function canDelete($member = null) {
|
||||
return ($this->Parent()->canEdit($member = null) && !$this->isReadonly());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -85,8 +85,8 @@ class EditableFormField extends DataObject {
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canEdit() {
|
||||
return ($this->Parent()->canEdit() && !$this->isReadonly());
|
||||
public function canEdit($member = null) {
|
||||
return ($this->Parent()->canEdit($member = null) && !$this->isReadonly());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,7 +86,7 @@ class EditableMultipleOptionField extends EditableFormField {
|
||||
*
|
||||
* @return DataObject
|
||||
*/
|
||||
public function duplicate() {
|
||||
public function duplicate($doWrite = true) {
|
||||
$clonedNode = parent::duplicate();
|
||||
|
||||
if($this->Options()) {
|
||||
|
Loading…
Reference in New Issue
Block a user