示例#1
0
 protected function closeRow(\CMB2_Field $field)
 {
     //error_log(print_r($field, true));
     if ($field->args['type'] == 'group') {
         \Cmb2Grid\Cmb2\Utils::initializeFieldArg($field, 'after_group');
         $field->args['after_group'] .= '</div>';
     } else {
         \Cmb2Grid\Cmb2\Utils::initializeFieldArg($field, 'after_row');
         $field->args['after_row'] .= '</div>';
     }
     /*\Cmb2Grid\Cmb2\Utils::initializeFieldArg($field, 'after_row');
     		$field->args['after_row'].= '</div>';*/
 }
示例#2
0
 public function setColumnClassCmb2()
 {
     $columnClass = $this->getColumnClass();
     $field = $this->getField();
     //error_log(print_r($field, true));
     if ($field->args['type'] == 'group') {
         \Cmb2Grid\Cmb2\Utils::initializeFieldArg($field, 'before_group');
         \Cmb2Grid\Cmb2\Utils::initializeFieldArg($field, 'after_group');
         $field->args['before_group'] .= "<div class='{$columnClass}'>";
         $field->args['after_group'] .= "</div>";
     } else {
         \Cmb2Grid\Cmb2\Utils::initializeFieldArg($field, 'before_row');
         \Cmb2Grid\Cmb2\Utils::initializeFieldArg($field, 'after_row');
         $field->args['before_row'] .= "<div class='{$columnClass}'>";
         $field->args['after_row'] .= "</div>";
     }
 }