Skip to content

Commit f67ea82

Browse files
committed
Update outdated code examples
1 parent 7e0fe15 commit f67ea82

File tree

7 files changed

+24
-58
lines changed

7 files changed

+24
-58
lines changed

snippets/tutorial/tutorial-series/part-1/files/lib/data/person/Person.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
/**
99
* Represents a person.
1010
*
11-
* @author Matthias Schmidt
11+
* @author Matthias Schmidt
1212
* @copyright 2001-2021 WoltLab GmbH
13-
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13+
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1414
*
1515
* @property-read int $personID unique id of the person
1616
* @property-read string $firstName first name of the person

snippets/tutorial/tutorial-series/part-1/files/lib/data/person/PersonAction.class.php

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,10 @@
77
/**
88
* Executes person-related actions.
99
*
10-
* @author Matthias Schmidt
10+
* @author Matthias Schmidt
1111
* @copyright 2001-2021 WoltLab GmbH
12-
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12+
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1313
*
14-
* @method Person create()
15-
* @method PersonEditor[] getObjects()
16-
* @method PersonEditor getSingleObject()
14+
* @extends AbstractDatabaseObjectAction<Person, PersonEditor>
1715
*/
18-
class PersonAction extends AbstractDatabaseObjectAction
19-
{
20-
/**
21-
* @inheritDoc
22-
*/
23-
protected $permissionsDelete = ['admin.content.canManagePeople'];
24-
25-
/**
26-
* @inheritDoc
27-
*/
28-
protected $requireACP = ['delete'];
29-
}
16+
class PersonAction extends AbstractDatabaseObjectAction {}

snippets/tutorial/tutorial-series/part-1/files/lib/data/person/PersonEditor.class.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
/**
88
* Provides functions to edit people.
99
*
10-
* @author Matthias Schmidt
10+
* @author Matthias Schmidt
1111
* @copyright 2001-2021 WoltLab GmbH
12-
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12+
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1313
*
14-
* @method static Person create(array $parameters = [])
15-
* @method Person getDecoratedObject()
16-
* @mixin Person
14+
* @mixin Person
15+
* @extends DatabaseObjectEditor<Person>
1716
*/
1817
class PersonEditor extends DatabaseObjectEditor
1918
{

snippets/tutorial/tutorial-series/part-1/files/lib/data/person/PersonList.class.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
/**
88
* Represents a list of people.
99
*
10-
* @author Matthias Schmidt
10+
* @author Matthias Schmidt
1111
* @copyright 2001-2021 WoltLab GmbH
12-
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12+
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1313
*
14-
* @method Person current()
15-
* @method Person[] getObjects()
16-
* @method Person|null search($objectID)
17-
* @property Person[] $objects
14+
* @extends DatabaseObjectList<Person>
1815
*/
1916
class PersonList extends DatabaseObjectList {}

snippets/tutorial/tutorial-series/part-3/files/lib/data/person/PersonAction.class.php

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,10 @@
77
/**
88
* Executes person-related actions.
99
*
10-
* @author Matthias Schmidt
10+
* @author Matthias Schmidt
1111
* @copyright 2001-2021 WoltLab GmbH
12-
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12+
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1313
*
14-
* @method Person create()
15-
* @method PersonEditor[] getObjects()
16-
* @method PersonEditor getSingleObject()
14+
* @extends AbstractDatabaseObjectAction<Person, PersonEditor>
1715
*/
18-
class PersonAction extends AbstractDatabaseObjectAction
19-
{
20-
/**
21-
* @inheritDoc
22-
*/
23-
protected $permissionsDelete = ['admin.content.canManagePeople'];
24-
25-
/**
26-
* @inheritDoc
27-
*/
28-
protected $requireACP = ['delete'];
29-
}
16+
class PersonAction extends AbstractDatabaseObjectAction {}

snippets/tutorial/tutorial-series/part-3/files/lib/data/person/PersonEditor.class.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
/**
88
* Provides functions to edit people.
99
*
10-
* @author Matthias Schmidt
10+
* @author Matthias Schmidt
1111
* @copyright 2001-2021 WoltLab GmbH
12-
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12+
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1313
*
14-
* @method static Person create(array $parameters = [])
15-
* @method Person getDecoratedObject()
16-
* @mixin Person
14+
* @mixin Person
15+
* @extends DatabaseObjectEditor<Person>
1716
*/
1817
class PersonEditor extends DatabaseObjectEditor
1918
{

snippets/tutorial/tutorial-series/part-3/files/lib/data/person/PersonList.class.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
/**
88
* Represents a list of people.
99
*
10-
* @author Matthias Schmidt
10+
* @author Matthias Schmidt
1111
* @copyright 2001-2021 WoltLab GmbH
12-
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12+
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1313
*
14-
* @method Person current()
15-
* @method Person[] getObjects()
16-
* @method Person|null search($objectID)
17-
* @property Person[] $objects
14+
* @extends DatabaseObjectList<Person>
1815
*/
1916
class PersonList extends DatabaseObjectList {}

0 commit comments

Comments
 (0)