original_string: protected function getEntityById($entity_id) {
      $entity_ids = $this->entityTypeManager->getStorage('media_type')
        ->getQuery()->condition('id', $entity_id)->execute();
  
      $id = reset($entity_ids);
      if ($id !== FALSE) {
        return $this->entityTypeManager->getStorage('media_type')->load($id);
      }
      return '';
    }
code: protected function getEntityById($entity_id) {
      $entity_ids = $this->entityTypeManager->getStorage('media_type')
        ->getQuery()->condition('id', $entity_id)->execute();
  
      $id = reset($entity_ids);
      if ($id !== FALSE) {
        return $this->entityTypeManager->getStorage('media_type')->load($id);
      }
      return '';
    }
code_tokens: protected function getEntityById ( $ entity_id ) { $ entity_ids = $ this -> entityTypeManager -> getStorage ( 'media_type' ) -> getQuery ( ) -> condition ( 'id' , $ entity_id ) -> execute ( ) ; $ id = reset ( $ entity_ids ) ; if ( $ id !== FALSE ) { return $ this -> entityTypeManager -> getStorage ( 'media_type' ) -> load ( $ id ) ; } return '' ; }
docstring: Find a media_type by id and return it or nothing.
  
  @param string $entity_id
  The media type.
  
  @return \Drupal\Core\Entity\EntityInterface|string
  Return the loaded entity or nothing.
  
  @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
  Thrown by getStorage() if the entity type doesn't exist.
  @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
  Thrown by getStorage() if the storage handler couldn't be loaded.
docstring_tokens: Find a media_type by id and return it or nothing .