Merge pull request #114 from robbieaverill/pulls/2.0-deprecation

API Add deprecation notices for removed methods in 2.0
This commit is contained in:
sachajudd 2017-05-09 12:12:55 +12:00 committed by GitHub
commit c761820245
4 changed files with 28 additions and 0 deletions

View File

@ -27,6 +27,8 @@ class DMSDocumentAddController extends LeftAndMain
* Add an array of additional allowed extensions * Add an array of additional allowed extensions
* @static * @static
* @param $array * @param $array
*
* @deprecated 2.0 Will be removed in future in favour of YAML configuration
*/ */
public static function add_allowed_extensions($array = null) public static function add_allowed_extensions($array = null)
{ {

View File

@ -18,6 +18,8 @@ class DMSSiteTreeExtension extends DataExtension
* Do not show the documents tab on the array of pages set here * Do not show the documents tab on the array of pages set here
* @static * @static
* @param $mixed Array of page types to not show the Documents tab on * @param $mixed Array of page types to not show the Documents tab on
*
* @deprecated 2.0 Will be removed in favour of YAML configuration
*/ */
public static function no_documents_tab($array = array()) public static function no_documents_tab($array = array())
{ {
@ -36,6 +38,8 @@ class DMSSiteTreeExtension extends DataExtension
* still not be shown. If this isn't called, or if it is called with an empty array, all pages will get Document tabs. * still not be shown. If this isn't called, or if it is called with an empty array, all pages will get Document tabs.
* @static * @static
* @param $array Array of page types to show the Documents tab on * @param $array Array of page types to show the Documents tab on
*
* @deprecated 2.0 Will be removed in favour of YAML configuration
*/ */
public static function show_documents_tab($array = array()) public static function show_documents_tab($array = array())
{ {
@ -132,6 +136,8 @@ class DMSSiteTreeExtension extends DataExtension
/** /**
* Enforce sorting for frontend * Enforce sorting for frontend
*
* @deprecated 2.0 Will be removed in future
*/ */
public function PageDocuments() public function PageDocuments()
{ {

View File

@ -23,6 +23,8 @@ interface DMSDocumentInterface
* @abstract * @abstract
* @param $pageObject Page object to associate this DMSDocument with * @param $pageObject Page object to associate this DMSDocument with
* @return null * @return null
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function addPage($pageObject); public function addPage($pageObject);
@ -32,6 +34,8 @@ interface DMSDocumentInterface
* @abstract * @abstract
* @param $pageIDs array of page ids used for the page objects associate this DMSDocument with * @param $pageIDs array of page ids used for the page objects associate this DMSDocument with
* @return null * @return null
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function addPages($pageIDs); public function addPages($pageIDs);
@ -47,6 +51,8 @@ interface DMSDocumentInterface
* Returns a list of the Page objects associated with this DMSDocument * Returns a list of the Page objects associated with this DMSDocument
* @abstract * @abstract
* @return DataList * @return DataList
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function getPages(); public function getPages();
@ -54,6 +60,8 @@ interface DMSDocumentInterface
* Removes all associated Pages from the DMSDocument * Removes all associated Pages from the DMSDocument
* @abstract * @abstract
* @return null * @return null
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function removeAllPages(); public function removeAllPages();

View File

@ -164,6 +164,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface
* @param SiteTree $pageObject Page object to associate this Document with * @param SiteTree $pageObject Page object to associate this Document with
* *
* @return DMSDocument * @return DMSDocument
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function addPage($pageObject) public function addPage($pageObject)
{ {
@ -182,6 +184,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface
* @param array $pageIDs * @param array $pageIDs
* *
* @return DMSDocument * @return DMSDocument
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function addPages($pageIDs) public function addPages($pageIDs)
{ {
@ -203,6 +207,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface
* @param SiteTree $pageObject Page object to remove the association to * @param SiteTree $pageObject Page object to remove the association to
* *
* @return DMSDocument * @return DMSDocument
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function removePage($pageObject) public function removePage($pageObject)
{ {
@ -215,6 +221,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface
* @see getPages() * @see getPages()
* *
* @return DataList * @return DataList
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function Pages() public function Pages()
{ {
@ -228,6 +236,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface
* Returns a list of the Page objects associated with this Document. * Returns a list of the Page objects associated with this Document.
* *
* @return DataList * @return DataList
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function getPages() public function getPages()
{ {
@ -238,6 +248,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface
* Removes all associated Pages from the DMSDocument * Removes all associated Pages from the DMSDocument
* *
* @return DMSDocument * @return DMSDocument
*
* @deprecated 2.0 Will be removed in future in favour of document sets
*/ */
public function removeAllPages() public function removeAllPages()
{ {