Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Commit

Permalink
Merge pull request #194 from Srgk/master
Browse files Browse the repository at this point in the history
add the ability to specify multiple column sizes
  • Loading branch information
neilime committed Feb 17, 2017
2 parents aac9657 + 61ad844 commit 61b484b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TwbBundle/Form/View/Helper/TwbBundleFormRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ public function getRowClassFromElement(\Zend\Form\ElementInterface $oElement)
// Column size
if (($sColumSize = $oElement->getOption('column-size')) && $oElement->getOption('twb-layout') !== TwbBundleForm::LAYOUT_HORIZONTAL
) {
$sRowClass .= ' col-' . $sColumSize;
$sColumSize = (is_array($sColumSize)) ? $sColumSize : array($sColumSize);
$sRowClass .= implode('', array_map(function($item) { return ' col-' . $item; }, $sColumSize));
}

//Additional row class
Expand Down

0 comments on commit 61b484b

Please sign in to comment.