[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Association/ -> AssociationServiceTrait.php (source)

   1  <?php
   2  
   3  /**
   4   * Joomla! Content Management System
   5   *
   6   * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   7   * @license    GNU General Public License version 2 or later; see LICENSE
   8   */
   9  
  10  namespace Joomla\CMS\Association;
  11  
  12  // phpcs:disable PSR1.Files.SideEffects
  13  \defined('JPATH_PLATFORM') or die;
  14  // phpcs:enable PSR1.Files.SideEffects
  15  
  16  /**
  17   * Trait to implement AssociationServiceInterface
  18   *
  19   * @since  4.0.0
  20   */
  21  trait AssociationServiceTrait
  22  {
  23      /**
  24       * The association extension.
  25       *
  26       * @var AssociationExtensionInterface
  27       *
  28       * @since  4.0.0
  29       */
  30      private $associationExtension = null;
  31  
  32      /**
  33       * Returns the associations extension helper class.
  34       *
  35       * @return  AssociationExtensionInterface
  36       *
  37       * @since  4.0.0
  38       */
  39      public function getAssociationsExtension(): AssociationExtensionInterface
  40      {
  41          return $this->associationExtension;
  42      }
  43  
  44      /**
  45       * The association extension.
  46       *
  47       * @param   AssociationExtensionInterface  $associationExtension  The extension
  48       *
  49       * @return  void
  50       *
  51       * @since  4.0.0
  52       */
  53      public function setAssociationExtension(AssociationExtensionInterface $associationExtension)
  54      {
  55          $this->associationExtension = $associationExtension;
  56      }
  57  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer