src/system/modules/subcolumns_bootstrap_customizable/classes/Netzmacht/ColumnSet/ColumnSet.php
public function createColumns($value, $mcw)
	{
		$columns = (int) $mcw->activeRecord->columns;
		$value = deserialize($value, true);
		$count = count($value);

		// initialize columns
		if($count == 0) {
			for($i= 0; $i < $columns; $i++) {
				$value[$i]['width'] = floor(12/$columns);
			}
		}
		// reduce columns if necessary
		elseif($count > $columns) {
			$count = count($value) - $columns;

			for($i=0; $i < $count; $i++) {
				array_pop($value);
			}
		}

		// make sure that column numbers has not changed
		else {
			for($i= 0; $i < ($columns - $count); $i++) {
				$value[$i+$count]['width'] = floor(12/$columns);
			}
		}

		return $value;
	}
public function createColumns($value, $mcw)
	{
		$columns = (int) $mcw->activeRecord->columns;
		$value = deserialize($value, true);
		$count = count($value);

		// initialize columns
		if($count == 0) {
			for($i= 0; $i < $columns; $i++) {
				$value[$i]['width'] = floor(12/$columns);
			}
		}
		// reduce columns if necessary
		elseif($count > $columns) {
			$count = count($value) - $columns;

			for($i=0; $i < $count; $i++) {
				array_pop($value);
			}
		}

		// make sure that column numbers has not changed
		else {
			for($i= 0; $i < ($columns - $count); $i++) {
				$value[$i+$count]['width'] = floor(12/$columns);
			}
		}

		return $value;
	}
public function createColumns ( $ value , $ mcw ) { $ columns = ( int ) $ mcw -> activeRecord -> columns ; $ value = deserialize ( $ value , true ) ; $ count = count ( $ value ) ; // initialize columns if ( $ count == 0 ) { for ( $ i = 0 ; $ i < $ columns ; $ i ++ ) { $ value [ $ i ] [ 'width' ] = floor ( 12 / $ columns ) ; } } // reduce columns if necessary elseif ( $ count > $ columns ) { $ count = count ( $ value ) - $ columns ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { array_pop ( $ value ) ; } } // make sure that column numbers has not changed else { for ( $ i = 0 ; $ i < ( $ columns - $ count ) ; $ i ++ ) { $ value [ $ i + $ count ] [ 'width' ] = floor ( 12 / $ columns ) ; } } return $ value ; }
create a MCW row for each column

@param string $value deseriazable value, for getting an array
@param $mcw multi column wizard or DC_Table
@return mixed
create a MCW row for each column