public function hideCommand(int $sysLanguageUid, int $pid = 1, int $recursion = 99, string $exclude = '', bool $verbose = false) {
    $this->beforeCommand();

    foreach ($this->getPageUids($pid, $recursion, $exclude) as $pageUid) {
      $languageOverlay = LanguageOverlay::where([['pid', '=', $pageUid], ['sys_language_uid', '=', $sysLanguageUid]])->first();

      if ($languageOverlay) {
        $uid    = $languageOverlay->uid;
        $title  = $languageOverlay->title;
        $hidden = $languageOverlay->hidden;

        if (!$hidden) {
          $languageOverlay->hidden = true;
          $languageOverlay->save();

          $this->log("Language overlay `{$title}` ({$uid}) of the page with UID {$pageUid} is now hidden.", 'ok', $verbose);
        } else {
          $this->log("Language overlay `{$title}` ({$uid}) of the page with UID {$pageUid} is already hidden, skipping...", 'warning', $verbose);
        }
      }
    }
  }
public function hideCommand(int $sysLanguageUid, int $pid = 1, int $recursion = 99, string $exclude = '', bool $verbose = false) {
    $this->beforeCommand();

    foreach ($this->getPageUids($pid, $recursion, $exclude) as $pageUid) {
      $languageOverlay = LanguageOverlay::where([['pid', '=', $pageUid], ['sys_language_uid', '=', $sysLanguageUid]])->first();

      if ($languageOverlay) {
        $uid    = $languageOverlay->uid;
        $title  = $languageOverlay->title;
        $hidden = $languageOverlay->hidden;

        if (!$hidden) {
          $languageOverlay->hidden = true;
          $languageOverlay->save();

          $this->log("Language overlay `{$title}` ({$uid}) of the page with UID {$pageUid} is now hidden.", 'ok', $verbose);
        } else {
          $this->log("Language overlay `{$title}` ({$uid}) of the page with UID {$pageUid} is already hidden, skipping...", 'warning', $verbose);
        }
      }
    }
  }
public function hideCommand ( int $ sysLanguageUid , int $ pid = 1 , int $ recursion = 99 , string $ exclude = '' , bool $ verbose = false ) { $ this -> beforeCommand ( ) ; foreach ( $ this -> getPageUids ( $ pid , $ recursion , $ exclude ) as $ pageUid ) { $ languageOverlay = LanguageOverlay :: where ( [ [ 'pid' , '=' , $ pageUid ] , [ 'sys_language_uid' , '=' , $ sysLanguageUid ] ] ) -> first ( ) ; if ( $ languageOverlay ) { $ uid = $ languageOverlay -> uid ; $ title = $ languageOverlay -> title ; $ hidden = $ languageOverlay -> hidden ; if ( ! $ hidden ) { $ languageOverlay -> hidden = true ; $ languageOverlay -> save ( ) ; $ this -> log ( "Language overlay `{$title}` ({$uid}) of the page with UID {$pageUid} is now hidden." , 'ok' , $ verbose ) ; } else { $ this -> log ( "Language overlay `{$title}` ({$uid}) of the page with UID {$pageUid} is already hidden, skipping..." , 'warning' , $ verbose ) ; } } } }
Hides page language overlays.

@param int $sysLanguageUid The system language UID of the page language overlays to hide
@param int $pid The optional PID of the page to search from, defaults to `1`
@param int $recursion The optional recursion, defaults to `99`
@param string $exclude The optional UIDs of pages to exclude from as string, seperated by `,`, empty by default
@param bool $verbose The optional verbosity, defaults to `false`
Hides page language overlays .