-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from nswdpc/general-code-updates
Updates and improvements
- Loading branch information
Showing
8 changed files
with
7,498 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
use SilverStripe\Forms\OptionsetField; | ||
use SilverStripe\Forms\TextField; | ||
use SilverStripe\Forms\Tip; | ||
use SilverStripe\Forms\SelectionGroup; | ||
use SilverStripe\ORM\ArrayList; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\ORM\DataObjectInterface; | ||
|
@@ -30,12 +31,12 @@ class InlineLinkField extends CompositeField | |
{ | ||
|
||
/** | ||
* @var gorriecoe\Link\Models\Link|null | ||
* @var \gorriecoe\Link\Models\Link|null | ||
*/ | ||
protected $record; | ||
|
||
/** | ||
* @var SilverStripe\ORM\DataObject|null | ||
* @var \SilverStripe\ORM\DataObject|null | ||
*/ | ||
protected $parent; | ||
|
||
|
@@ -272,10 +273,12 @@ public function setSubmittedValue($values, $data = null) | |
$field->setSubmittedValue( $value ); | ||
} | ||
} | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @param InlineLink_TitleField | ||
* @param InlineLink_TitleField $field | ||
*/ | ||
public function setTitleField(InlineLink_TitleField $field) { | ||
$this->title_field = $field; | ||
|
@@ -290,7 +293,7 @@ public function getTitleField() { | |
} | ||
|
||
/** | ||
* @param InlineLink_OpenInNewWindowField | ||
* @param InlineLink_OpenInNewWindowField $field | ||
*/ | ||
public function setOpenInNewWindowField(InlineLink_OpenInNewWindowField $field) { | ||
$this->open_in_new_window_field = $field; | ||
|
@@ -305,7 +308,7 @@ public function getOpenInNewWindowField() { | |
} | ||
|
||
/** | ||
* @param InlineLink_RemoveAction | ||
* @param InlineLink_RemoveAction $field | ||
*/ | ||
public function setRemoveField(InlineLink_RemoveAction $field) { | ||
$this->remove_field = $field; | ||
|
@@ -433,7 +436,6 @@ public function saveInto(DataObjectInterface $record) | |
/** | ||
* Create or save a link using the value from the form field | ||
* @param string $type eg. 'Email' | ||
* @param mixed $value eg. '[email protected]' | ||
* @param FormField $field the Form field holding the data related to the type | ||
* @return Link | ||
*/ | ||
|
@@ -585,7 +587,7 @@ public function prefixedFieldName($index) { | |
* @return string | ||
*/ | ||
protected function getIndexFromName($complete_field_name) { | ||
$type = ""; | ||
$index = ""; | ||
if($this->hasInlineElementalParent()) { | ||
// the field name should start with the prefix... | ||
if(strpos($complete_field_name, $this->getName() . self::FIELD_NAME_TYPE_SEPARATOR) !== 0) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters