original_string: protected function preparePage(array &$page)
      {
          $user = $this->user->get($page['user_id']);
  
          $this->setItemAlias($page, 'page', $this->alias);
          $this->setItemImages($page, 'page', $this->image);
          $this->setItemTranslation($page, 'page', $this->translation_entity);
  
          if (!empty($page['images'])) {
              foreach ($page['images'] as &$file) {
                  $this->setItemTranslation($file, 'file', $this->translation_entity);
              }
          }
  
          $page['author'] = isset($user['email']) ? $user['email'] : $this->text('Unknown');
      }
code: protected function preparePage(array &$page)
      {
          $user = $this->user->get($page['user_id']);
  
          $this->setItemAlias($page, 'page', $this->alias);
          $this->setItemImages($page, 'page', $this->image);
          $this->setItemTranslation($page, 'page', $this->translation_entity);
  
          if (!empty($page['images'])) {
              foreach ($page['images'] as &$file) {
                  $this->setItemTranslation($file, 'file', $this->translation_entity);
              }
          }
  
          $page['author'] = isset($user['email']) ? $user['email'] : $this->text('Unknown');
      }
code_tokens: protected function preparePage ( array & $ page ) { $ user = $ this -> user -> get ( $ page [ 'user_id' ] ) ; $ this -> setItemAlias ( $ page , 'page' , $ this -> alias ) ; $ this -> setItemImages ( $ page , 'page' , $ this -> image ) ; $ this -> setItemTranslation ( $ page , 'page' , $ this -> translation_entity ) ; if ( ! empty ( $ page [ 'images' ] ) ) { foreach ( $ page [ 'images' ] as & $ file ) { $ this -> setItemTranslation ( $ file , 'file' , $ this -> translation_entity ) ; } } $ page [ 'author' ] = isset ( $ user [ 'email' ] ) ? $ user [ 'email' ] : $ this -> text ( 'Unknown' ) ; }
docstring: Prepares an array of page data
  @param array $page
docstring_tokens: Prepares an array of page data