original_string: public function getUsage()
      {
          $usage = new ArrayList();
  
          if ($page = $this->getPage()) {
              $usage->push($page);
              if ($this->virtualOwner) {
                  $page->setField('ElementType', 'Linked');
              } else {
                  $page->setField('ElementType', 'Master');
              }
          }
  
          $linkedElements = ElementVirtual::get()->filter('LinkedElementID', $this->ID);
  
          foreach ($linkedElements as $element) {
              $area = $element->Parent();
  
              if ($area instanceof ElementalArea && $page = $area->getOwnerPage()) {
                  $page->setField('ElementType', 'Linked');
                  $usage->push($page);
              }
          }
  
          $usage->removeDuplicates();
          return $usage;
      }
code: public function getUsage()
      {
          $usage = new ArrayList();
  
          if ($page = $this->getPage()) {
              $usage->push($page);
              if ($this->virtualOwner) {
                  $page->setField('ElementType', 'Linked');
              } else {
                  $page->setField('ElementType', 'Master');
              }
          }
  
          $linkedElements = ElementVirtual::get()->filter('LinkedElementID', $this->ID);
  
          foreach ($linkedElements as $element) {
              $area = $element->Parent();
  
              if ($area instanceof ElementalArea && $page = $area->getOwnerPage()) {
                  $page->setField('ElementType', 'Linked');
                  $usage->push($page);
              }
          }
  
          $usage->removeDuplicates();
          return $usage;
      }
code_tokens: public function getUsage ( ) { $ usage = new ArrayList ( ) ; if ( $ page = $ this -> getPage ( ) ) { $ usage -> push ( $ page ) ; if ( $ this -> virtualOwner ) { $ page -> setField ( 'ElementType' , 'Linked' ) ; } else { $ page -> setField ( 'ElementType' , 'Master' ) ; } } $ linkedElements = ElementVirtual :: get ( ) -> filter ( 'LinkedElementID' , $ this -> ID ) ; foreach ( $ linkedElements as $ element ) { $ area = $ element -> Parent ( ) ; if ( $ area instanceof ElementalArea && $ page = $ area -> getOwnerPage ( ) ) { $ page -> setField ( 'ElementType' , 'Linked' ) ; $ usage -> push ( $ page ) ; } } $ usage -> removeDuplicates ( ) ; return $ usage ; }
docstring: get all pages where this element is used
  
  @return ArrayList
docstring_tokens: get all pages where this element is used