Home  >  Article  >  Backend Development  >  Drupal7 adds a column to the content management list

Drupal7 adds a column to the content management list

WBOY
WBOYOriginal
2016-07-25 08:47:391028browse
Add a column to the list in the background admin/content.
                 
                                                                                                                                                                                                                                                                                                                     


/**
* Implements hook_form_alter().
    */
  1. function mymodule_form_alter(&$form, &$form_state, $form_id) {
  2. if($form_id == 'node_admin_content') {
  3. $form['admin'][' nodes']['#header']['state'] = t('new row');
  4. foreach($form['admin']['nodes']['#options'] as $key => $row) {
  5.           $form['admin']['nodes']['#options'][$key]['state'] = 'new row';
  6.     }
  7.   }
  8. }
  9. Copy code
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn