示例#1
0
 /**
  * Get bundle names
  *
  * ## OPTIONS
  *
  * ## Examples
  *
  * wp config bundles
  *
  */
 function bundles()
 {
     $bundles = WPCFM()->helper->get_bundles();
     $header = array('Bundle', 'Label', 'In File', 'In DB', 'Configs');
     $table = new \cli\Table($header, array());
     foreach ($bundles as $bundle) {
         $row = array($bundle['name'], $bundle['label'], $bundle['is_file'], $bundle['is_db']);
         $row[] = implode(', ', $bundle['config']);
         $table->addrow($row);
     }
     $table->display();
 }