Merge branch '3.0'
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / acl / option / ACLOption.class.php
CommitLineData
092bdf82
AE
1<?php
2namespace wcf\data\acl\option;
3use wcf\data\DatabaseObject;
4
5/**
6 * Represents an acl option.
7 *
8 * @author Marcel Werk
c839bd49 9 * @copyright 2001-2018 WoltLab GmbH
092bdf82 10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
e71525e4 11 * @package WoltLabSuite\Core\Data\Acl\Option
e9335ed9 12 *
ed6a4e42
MS
13 * @property-read integer $optionID unique id of the acl option
14 * @property-read integer $packageID id of the package which delivers the acl option
15 * @property-read integer $objectTypeID id of the `com.woltlab.wcf.acl` object type
16 * @property-read string $optionName name and textual identifier of the acl option
17 * @property-read string $categoryName name of the acl option category the option belongs to
092bdf82
AE
18 */
19class ACLOption extends DatabaseObject {
092bdf82
AE
20 /**
21 * Returns a list of options by object type id.
22 *
23 * @param integer $objectTypeID
4e25add7 24 * @return ACLOptionList
092bdf82
AE
25 */
26 public static function getOptions($objectTypeID) {
27 $optionList = new ACLOptionList();
058cbd6a 28 $optionList->getConditionBuilder()->add("acl_option.objectTypeID = ?", [$objectTypeID]);
092bdf82
AE
29 $optionList->readObjects();
30
31 return $optionList;
32 }
33}