Answers.Body: <p>I assume both <code>text</code> and <code>id_str</code> are custom fields?</p>
  
  <pre><code>$event-&gt;params['entry']
  </code></pre>
  
  <p>Is an <a href="http://buildwithcraft.com/classreference/models/EntryModel" rel="nofollow">EntryModel</a>, so you should be able to do this:</p>
  
  <pre><code>$entry = $event-&gt;params['entry'];
  $idString = $entry-&gt;id_str;
  $text = $entry-&gt;text;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-02T15:48:58.923Z
Answers.Text: I can't do so, but I found a way $event->params['entry']->getFieldValue('tweet')['text']
Answers.UserDisplayName: user1091473
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-02T16:28:50.693Z
Answers.Text: Oh, you must be using a plugin that populates 'tweet', then.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-02T15:42:25.257Z
Answers.LastActivityDate: 2014-12-02T15:42:25.257Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>It's an array, so:</p>
  
  <pre><code>$entry = $event-&gt;params['entry'];
  $text = $entry['text'];
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-20T21:33:49.317Z
Answers.LastActivityDate: 2015-11-20T23:28:32.213Z
Answers.LastEditDate: 2015-11-20T23:28:32.213Z
Answers.UserDisplayName: Daniel Weber
Body: <p>I want to access for particular information which is contained in event object.</p>
  
  <pre><code>public function init()
  {
      parent::init();
  
      craft()-&gt;on('entries.saveEntry', function(Event $event) 
      {
  
          var_dump($event-&gt;params['entry']);
      });
  } 
  </code></pre>
  
  <p>it dumps info (brining a needed part)</p>
  
  <pre><code>     ......
  ["_preppedContent":"Craft\BaseElementModel":private]=&gt;
    array(1) {
      ["tweet"]=&gt;
      array(23) {
        ["created_at"]=&gt;
        string(30) "Thu Nov 13 09:15:40 +0000 2014"
        ["id"]=&gt;
        float(5.3282410346476E+17)
        ["id_str"]=&gt;
        string(18) "532824103464763392"
        ["text"]=&gt;
        string(115) "'The innovation insight you didn't get from Forbes' great blog by @LydiaRagoonanan @nesta_uk http://t.co/PImPVvWeAv"
        ["source"]=&gt;
        string(63) "Hootsuite"
        ["truncated"]=&gt;
        bool(false)
  </code></pre>
  
  <p>How can I extract <code>text</code>, <code>id_str</code> information?
  Thanks</p>
  
Tags: <php><events>
Title: how to access to event object propereties
ThreadText: # how to access to event object propereties
  
  (Asked by: username_0 on 2014-12-02)
  
  I want to access for particular information which is contained in event object.
  
  ```
  public function init()
  {
      parent::init();
  
      craft()->on('entries.saveEntry', function(Event $event) 
      {
  
          var_dump($event->params['entry']);
      });
  } 
  
  ```
  
  it dumps info (brining a needed part)
  
  ```
       ......
  ["_preppedContent":"Craft\BaseElementModel":private]=>
    array(1) {
      ["tweet"]=>
      array(23) {
        ["created_at"]=>
        string(30) "Thu Nov 13 09:15:40 +0000 2014"
        ["id"]=>
        float(5.3282410346476E+17)
        ["id_str"]=>
        string(18) "532824103464763392"
        ["text"]=>
        string(115) "'The innovation insight you didn't get from Forbes' great blog by @LydiaRagoonanan @nesta_uk http://t.co/PImPVvWeAv"
        ["source"]=>
        string(63) "Hootsuite"
        ["truncated"]=>
        bool(false)
  
  ```
  
  How can I extract `text`, `id_str` information?
  Thanks
  
  **Tags:** php, events
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2014-12-02. Score: 2
  
  I assume both `text` and `id_str` are custom fields?
  
  ```
  $event->params['entry']
  
  ```
  
  Is an [EntryModel](http://buildwithcraft.com/classreference/models/EntryModel), so you should be able to do this:
  
  ```
  $entry = $event->params['entry'];
  $idString = $entry->id_str;
  $text = $entry->text;
  
  ```
  
  > **Comments:**
  > **username_0**: I can't do so, but I found a way $event->params['entry']->getFieldValue('tweet')['text']  
  > **username_1**: Oh, you must be using a plugin that populates 'tweet', then.  
  
  ---
  
  ### Answer by username_2 on 2015-11-20. Score: -1
  
  It's an array, so:
  
  ```
  $entry = $event->params['entry'];
  $text = $entry['text'];
  
  ```
  
  
  ---
  
  