Merge pull request #18717 from eileenmcnaughton/static2
[civicrm-core.git] / Civi / Api4 / Action / Domain / Get.php
CommitLineData
19b53e5b
C
1<?php
2
380f3545
TO
3/*
4 +--------------------------------------------------------------------+
41498ac5 5 | Copyright CiviCRM LLC. All rights reserved. |
380f3545 6 | |
41498ac5
TO
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
380f3545
TO
10 +--------------------------------------------------------------------+
11 */
12
13/**
14 *
15 * @package CRM
ca5cec67 16 * @copyright CiviCRM LLC https://civicrm.org/licensing
380f3545
TO
17 */
18
19
19b53e5b
C
20namespace Civi\Api4\Action\Domain;
21
651c4c95
CW
22use Civi\Api4\Generic\Result;
23
19b53e5b
C
24/**
25 * @inheritDoc
26 */
27class Get extends \Civi\Api4\Generic\DAOGetAction {
28
29 /**
30 * Return only the current domain.
31 *
32 * @var bool
33 */
34 protected $currentDomain = FALSE;
35
36 /**
37 * @inheritDoc
38 */
651c4c95 39 protected function getObjects(Result $result) {
19b53e5b
C
40 if ($this->currentDomain) {
41 $this->addWhere('id', '=', \CRM_Core_Config::domainID());
42 }
651c4c95 43 parent::getObjects($result);
19b53e5b
C
44 }
45
46}