You are here

class TwitterStatus in Twitter 8

Defines the twitter status entity class.

Plugin annotation


@EntityType(
  id = "twitter_status",
  label = @Translation("Individual Twitter statuses"),
  module = "twitter",
  controllers = {
    "storage" = "Drupal\twitter\TwitterStatusStorageController",
    "access" = "Drupal\twitter\TwitterStatusAccessController",
    "render" = "Drupal\Core\Entity\EntityRenderController",
    "form" = {
      "default" = "Drupal\twitter\TwitterStatusFormController",
    },
    "translation" = "Drupal\twitter\TwitterStatusTranslationController"
  },
  base_table = "twitter",
  uri_callback = "twitter_status_uri",
  label_callback = "twitter_status_label",
  fieldable = TRUE,
  translatable = TRUE,
  entity_keys = {
    "id" = "twitter_id",
    "uuid" = "uuid"
  }
)

Hierarchy

  • class \Drupal\twitter\Plugin\Core\Entity\TwitterStatus extends \Drupal\twitter\Plugin\Core\Entity\EntityNG

Expanded class hierarchy of TwitterStatus

File

src/Plugin/Core/Entity/TwitterStatus.php, line 32

Namespace

Drupal\twitter\Plugin\Core\Entity
View source
class TwitterStatus extends EntityNG {

  /**
   * Class TwitterStatus.
   *
   * @var created_at
   */
  public $createdAt;
  public $id;
  public $text;
  public $source;
  public $truncated;
  public $favorited;
  public $inReplyToStatusId;
  public $inReplyToUserId;
  public $inReplyToScreenName;
  public $user;

  /**
   * Constructor for TwitterStatus.
   */
  public function __construct($values = []) {
    if (isset($values['user'])) {
      $this->user = new TwitterAccount($values['user']);
      unset($values['user']);
    }
    parent::__construct($values, 'twitter_status');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TwitterStatus::$createdAt public property Class TwitterStatus.
TwitterStatus::$favorited public property
TwitterStatus::$id public property
TwitterStatus::$inReplyToScreenName public property
TwitterStatus::$inReplyToStatusId public property
TwitterStatus::$inReplyToUserId public property
TwitterStatus::$source public property
TwitterStatus::$text public property
TwitterStatus::$truncated public property
TwitterStatus::$user public property
TwitterStatus::__construct public function Constructor for TwitterStatus.