Answers.Body: <p>If you wanna change the title one way is override the <code>__toString()</code> method on your model.</p>
  
  <pre><code>/**
   * @return string
   */
  public function __toString()
  {
      return (string)$this-&gt;name;
  }
  </code></pre>
  
  <p>If you wanna chage the status icon next to the title you can override the <code>getElementQueryStatusCondition</code> function on your ElementType class</p>
  
  <pre><code>public function getElementQueryStatusCondition(DbCommand $query, $status)
  {}
  </code></pre>
  
  <p>Regards</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-09T18:39:37.530Z
Answers.Text: I don't follow the __toString() part. I updated my code a tiny bit. I want to be able to just append some text, icon, or html to the titles in the entries list in the CP.
Answers.UserDisplayName: Erik
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-09T18:09:25.487Z
Answers.LastActivityDate: 2016-06-09T18:22:04.410Z
Answers.LastEditDate: 2016-06-09T18:22:04.410Z
Answers.UserDisplayName: Andre L.
Body: <p>I am trying to get access to the attribute title using this, but does not work. If I switch out 'title' for slug, uri, etc. It works. But not title. Anyway I can do this?</p>
  
  <pre><code>public function getEntryTableAttributeHtml(EntryModel $entry, $attribute)
  {    
      switch ($attribute) {
          case 'title':
              return $entry-&gt;title . ': Something appended to title';
              break;
      }
  }
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>Added in <code>return $entry-&gt;title . ': Something appended to title';</code> to the case to show I want to append something to the title.</p>
  
  <p>I want to be able to just append some text, icon, or html to the titles in the entries list in the CP.</p>
  
Tags: <plugin-development>
Title: Trying to access 'title' attribute via getEntryTableAttributeHtml. Any idea how?
ThreadText: # Trying to access 'title' attribute via getEntryTableAttributeHtml. Any idea how?
  
  (Asked by: username_0 on 2016-06-09)
  
  I am trying to get access to the attribute title using this, but does not work. If I switch out 'title' for slug, uri, etc. It works. But not title. Anyway I can do this?
  
  ```
  public function getEntryTableAttributeHtml(EntryModel $entry, $attribute)
  {    
      switch ($attribute) {
          case 'title':
              return $entry->title . ': Something appended to title';
              break;
      }
  }
  
  ```
  
  **Update**
  
  Added in `return $entry->title . ': Something appended to title';` to the case to show I want to append something to the title.
  
  I want to be able to just append some text, icon, or html to the titles in the entries list in the CP.
  
  **Tags:** plugin-development
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-06-09. Score: 1
  
  If you wanna change the title one way is override the `__toString()` method on your model.
  
  ```
  /**
   * @return string
   */
  public function __toString()
  {
      return (string)$this->name;
  }
  
  ```
  
  If you wanna chage the status icon next to the title you can override the `getElementQueryStatusCondition` function on your ElementType class
  
  ```
  public function getElementQueryStatusCondition(DbCommand $query, $status)
  {}
  
  ```
  
  Regards
  
  > **Comments:**
  > **username_0**: I don't follow the __toString() part. I updated my code a tiny bit. I want to be able to just append some text, icon, or html to the titles in the entries list in the CP.  
  
  ---
  
  