[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Workflow/ -> WorkflowServiceInterface.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.txt
   8   */
   9  
  10  namespace Joomla\CMS\Workflow;
  11  
  12  // phpcs:disable PSR1.Files.SideEffects
  13  \defined('JPATH_PLATFORM') or die;
  14  // phpcs:enable PSR1.Files.SideEffects
  15  
  16  /**
  17   * The workflow service.
  18   *
  19   * @since  4.0.0
  20   */
  21  interface WorkflowServiceInterface
  22  {
  23      /**
  24       * Check if the functionality is supported by the context
  25       *
  26       * @param   string  $functionality  The functionality
  27       * @param   string  $context        The context of the functionality
  28       *
  29       * @return boolean
  30       *
  31       * @since  4.0.0
  32       */
  33      public function supportFunctionality($functionality, $context): bool;
  34  
  35      /**
  36       * Returns the model name, based on the context
  37       *
  38       * @param   string  $context  The context of the workflow
  39       *
  40       * @return boolean
  41       */
  42      public function getModelName($context): string;
  43  
  44      /**
  45       * Check if the workflow is active
  46       *
  47       * @param   string  $context  The context of the workflow
  48       *
  49       * @return boolean
  50       */
  51      public function isWorkflowActive($context): bool;
  52  
  53      /**
  54       * Method to filter transitions by given id of state.
  55       *
  56       * @param   integer[]  $transitions  Array of transitions to filter for
  57       * @param   integer    $pk           Id of the state on which the transitions are performed
  58       *
  59       * @return  array
  60       *
  61       * @since  4.0.0
  62       */
  63      public function filterTransitions(array $transitions, int $pk): array;
  64  
  65      /**
  66       * Returns an array of possible conditions for the component.
  67       *
  68       * @param   string  $extension  Full extension string
  69       *
  70       * @return  array
  71       *
  72       * @since   4.0.0
  73       */
  74      public static function getConditions(string $extension): array;
  75  
  76      /**
  77       * Returns a table name for the state association
  78       *
  79       * @param   string  $section  An optional section to differ different areas in the component
  80       *
  81       * @return  string
  82       *
  83       * @since   4.0.0
  84       */
  85      public function getWorkflowTableBySection(?string $section = null): string;
  86  
  87      /**
  88       * Returns valid contexts.
  89       *
  90       * @return  array
  91       *
  92       * @since   4.0.0
  93       */
  94      public function getWorkflowContexts(): array;
  95  
  96      /**
  97       * Returns the workflow context based on the given category section
  98       *
  99       * @param   string  $section  The section
 100       *
 101       * @return  string|null
 102       *
 103       * @since   4.0.0
 104       */
 105      public function getCategoryWorkflowContext(?string $section = null): string;
 106  }


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