Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Deprecate API that will be renamed #181

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion code/SiteConfigLeftAndMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use SilverStripe\Admin\LeftAndMain;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Control\Director;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
Expand Down Expand Up @@ -46,6 +47,7 @@ class SiteConfigLeftAndMain extends LeftAndMain

/**
* @var string
* @deprecated 5.4.0 Will be renamed to model_class
*/
private static $tree_class = SiteConfig::class;

Expand Down Expand Up @@ -147,9 +149,11 @@ public function getEditForm($id = null, $fields = null)
* @param array $data
* @param Form $form
* @return String
* @deprecated 5.4.0 Will be replaced with save()
*/
public function save_siteconfig($data, $form)
{
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be replaced with save()');
$data = $form->getData();
$siteConfig = DataObject::get_by_id(SiteConfig::class, $data['ID']);
$form->saveInto($siteConfig);
Expand All @@ -164,7 +168,6 @@ public function save_siteconfig($data, $form)
return $form->forTemplate();
}


public function Breadcrumbs($unlinked = false)
{
return new ArrayList(array(
Expand Down