public function buildContent($entity, $view_mode = 'full', $langcode = NULL, $content = array())
 {
     $wrapper = entity_metadata_wrapper('spotify_playlist_track', $entity);
     $content['author'] = array('#markup' => t('Created by: !author', array('!author' => $wrapper->uid->name->value(array('sanitize' => TRUE)))));
     // Make Description and Status themed like default fields.
     $content['description'] = array('#theme' => 'field', '#weight' => 0, '#title' => t('Track Description'), '#access' => TRUE, '#label_display' => 'above', '#view_mode' => 'full', '#language' => LANGUAGE_NONE, '#field_name' => 'field_fake_description', '#field_type' => 'text', '#entity_type' => 'spotify_playlist_track', '#bundle' => $entity->type, '#items' => array(array('value' => $entity->description)), '#formatter' => 'text_default', 0 => array('#markup' => check_plain($entity->description)));
     return parent::buildContent($entity, $view_mode, $langcode, $content);
 }
 public function buildContent($entity, $view_mode = 'full', $langcode = NULL, $content = array())
 {
     $build = parent::buildContent($entity, $view_mode, $langcode, $content);
     $build['product_quantity'] = array('#type' => 'markup', '#markup' => 'This is the quantity:' . $entity->product_quantity);
     // field is now a term
     /*$build['product_typed'] = array(
         '#type' => 'markup',
         '#markup' => 'This is the type:'. $entity->product_type . ', so yeah.',
       );*/
     return $build;
 }
Ejemplo n.º 3
0
 public function buildContent($entity, $view_mode = 'default', $langcode = NULL, $content = array())
 {
     $build = parent::buildContent($entity, $view_mode, $langcode, $content);
     return $build;
 }