Skip to content

Commit

Permalink
API Deprecate API that will be renamed (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Oct 31, 2024
1 parent 26495e3 commit e467a37
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit e467a37

Please sign in to comment.