title: Call a function inside a if condition
body: <p>Hi guys i am trying to move my if condition code inside another new function and i would like to call that in my another function how can i do that</p>
  
  <p>Here is my if condition :</p>
  
  <pre><code>if (self::GRID_LIST_STATUS_AGENDA === $gridType) {
              // Personal agenda sortation of statuses
              unset($finalFilters['statusId']['distinct']);
              $finalFilters['statusId']['values'] = [
                  BAS_Shared_Model_Ticket::STATUS_REPLY_RELATION =&gt; 'relation reply',
                  BAS_Shared_Model_Ticket::STATUS_REMINDER =&gt; 'followup',
                  BAS_Shared_Model_Ticket::STATUS_NEW =&gt; 'new',
                  BAS_Shared_Model_Ticket::STATUS_IN_PROGRESS =&gt; 'in progress',
                  BAS_Shared_Model_Ticket::STATUS_REOPEN =&gt; 'reopened',
              ];
          }
  </code></pre>
  
  <p>Here is the new function that  i want to move </p>
  
  <pre><code>/**
       * Get personal agenda sortation statuses
       */
      public function personalAgendaSortationStatuses()
      {
  
      }
  </code></pre>
  
  <p>Can anyone help me how can i do that</p>