public function initializeCommand(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;

        $this->log("Language overlay `{$title}` ({$uid}) for the page with UID {$pageUid} already exists, skipping...", 'warning', $verbose);
      } else {
        $page = Page::where([['uid', '=', $pageUid]])->first();

        $languageOverlay                     = new LanguageOverlay;
        $languageOverlay->pid                = $pageUid;
        $languageOverlay->sys_language_uid   = $sysLanguageUid;
        $languageOverlay->doktype            = $page->doktype;
        $languageOverlay->title              = $page->title;
        $languageOverlay->nav_title          = $page->nav_title;
        $languageOverlay->title              = $page->title;
        $languageOverlay->keywords           = $page->keywords;
        $languageOverlay->description        = $page->description;
        $languageOverlay->abstract           = $page->abstract;
        $languageOverlay->author             = $page->author;
        $languageOverlay->author_email       = $page->author_email;
        $languageOverlay->tx_t3vpage_summary = $page->tx_t3vpage_summary;
        $languageOverlay->tx_t3vpage_claim   = $page->tx_t3vpage_claim;
        $languageOverlay->tx_t3vpage_outline = $page->tx_t3vpage_outline;
        $languageOverlay->save();

        $this->log("New page language overlay for the page with UID {$pageUid} initialized.", 'ok', $verbose);
      }
    }
  }
public function initializeCommand(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;

        $this->log("Language overlay `{$title}` ({$uid}) for the page with UID {$pageUid} already exists, skipping...", 'warning', $verbose);
      } else {
        $page = Page::where([['uid', '=', $pageUid]])->first();

        $languageOverlay                     = new LanguageOverlay;
        $languageOverlay->pid                = $pageUid;
        $languageOverlay->sys_language_uid   = $sysLanguageUid;
        $languageOverlay->doktype            = $page->doktype;
        $languageOverlay->title              = $page->title;
        $languageOverlay->nav_title          = $page->nav_title;
        $languageOverlay->title              = $page->title;
        $languageOverlay->keywords           = $page->keywords;
        $languageOverlay->description        = $page->description;
        $languageOverlay->abstract           = $page->abstract;
        $languageOverlay->author             = $page->author;
        $languageOverlay->author_email       = $page->author_email;
        $languageOverlay->tx_t3vpage_summary = $page->tx_t3vpage_summary;
        $languageOverlay->tx_t3vpage_claim   = $page->tx_t3vpage_claim;
        $languageOverlay->tx_t3vpage_outline = $page->tx_t3vpage_outline;
        $languageOverlay->save();

        $this->log("New page language overlay for the page with UID {$pageUid} initialized.", 'ok', $verbose);
      }
    }
  }
public function initializeCommand ( 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 ; $ this -> log ( "Language overlay `{$title}` ({$uid}) for the page with UID {$pageUid} already exists, skipping..." , 'warning' , $ verbose ) ; } else { $ page = Page :: where ( [ [ 'uid' , '=' , $ pageUid ] ] ) -> first ( ) ; $ languageOverlay = new LanguageOverlay ; $ languageOverlay -> pid = $ pageUid ; $ languageOverlay -> sys_language_uid = $ sysLanguageUid ; $ languageOverlay -> doktype = $ page -> doktype ; $ languageOverlay -> title = $ page -> title ; $ languageOverlay -> nav_title = $ page -> nav_title ; $ languageOverlay -> title = $ page -> title ; $ languageOverlay -> keywords = $ page -> keywords ; $ languageOverlay -> description = $ page -> description ; $ languageOverlay -> abstract = $ page -> abstract ; $ languageOverlay -> author = $ page -> author ; $ languageOverlay -> author_email = $ page -> author_email ; $ languageOverlay -> tx_t3vpage_summary = $ page -> tx_t3vpage_summary ; $ languageOverlay -> tx_t3vpage_claim = $ page -> tx_t3vpage_claim ; $ languageOverlay -> tx_t3vpage_outline = $ page -> tx_t3vpage_outline ; $ languageOverlay -> save ( ) ; $ this -> log ( "New page language overlay for the page with UID {$pageUid} initialized." , 'ok' , $ verbose ) ; } } }
Initializes page language overlays.

@param int $sysLanguageUid The system language UID of the page language overlays to initialize
@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`
Initializes page language overlays .