- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from syberon/elements-custom-attributes
Custom attributes to 'form', 'fieldset' and 'form-group' wrapper
- Loading branch information
Showing
7 changed files
with
238 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/TwbsHelper/Form/View/Helper/Factory/FormCollectionFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2019. | ||
* | ||
* @author Syber | ||
*/ | ||
|
||
namespace TwbsHelper\Form\View\Helper\Factory; | ||
|
||
class FormCollectionFactory implements \Zend\ServiceManager\FactoryInterface | ||
{ | ||
/** | ||
* Compatibility with ZF2 (>= 2.2) -> proxy to __invoke | ||
* | ||
* @param \Zend\ServiceManager\ServiceLocatorInterface $oServiceLocator | ||
* @param mixed $sCanonicalName | ||
* @param mixed $sRequestedName | ||
* @return void | ||
*/ | ||
public function createService( | ||
\Zend\ServiceManager\ServiceLocatorInterface $oServiceLocator, | ||
$sCanonicalName = null, | ||
$sRequestedName = null | ||
) { | ||
return $this($oServiceLocator, $sRequestedName); | ||
} | ||
|
||
/** | ||
* Compatibility with ZF3 | ||
* | ||
* @param \Interop\Container\ContainerInterface $oContainer | ||
* @param mixed $sRequestedName | ||
* @param array $aOptions | ||
* @return void | ||
*/ | ||
public function __invoke(\Interop\Container\ContainerInterface $oContainer, $sRequestedName, array $aOptions = null) | ||
{ | ||
$oOptions = $oContainer->get(\TwbsHelper\Options\ModuleOptions::class); | ||
|
||
return new \TwbsHelper\Form\View\Helper\FormCollection($oOptions); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2019. | ||
* | ||
* @author Syber | ||
*/ | ||
|
||
namespace TwbsHelper\Form\View\Helper\Factory; | ||
|
||
class FormFactory implements \Zend\ServiceManager\FactoryInterface | ||
{ | ||
/** | ||
* Compatibility with ZF2 (>= 2.2) -> proxy to __invoke | ||
* | ||
* @param \Zend\ServiceManager\ServiceLocatorInterface $oServiceLocator | ||
* @param mixed $sCanonicalName | ||
* @param mixed $sRequestedName | ||
* @return void | ||
*/ | ||
public function createService( | ||
\Zend\ServiceManager\ServiceLocatorInterface $oServiceLocator, | ||
$sCanonicalName = null, | ||
$sRequestedName = null | ||
) { | ||
return $this($oServiceLocator, $sRequestedName); | ||
} | ||
|
||
/** | ||
* Compatibility with ZF3 | ||
* | ||
* @param \Interop\Container\ContainerInterface $oContainer | ||
* @param mixed $sRequestedName | ||
* @param array $aOptions | ||
* @return void | ||
*/ | ||
public function __invoke(\Interop\Container\ContainerInterface $oContainer, $sRequestedName, array $aOptions = null) | ||
{ | ||
$oOptions = $oContainer->get(\TwbsHelper\Options\ModuleOptions::class); | ||
|
||
return new \TwbsHelper\Form\View\Helper\Form($oOptions); | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/TwbsHelper/Form/View/Helper/Factory/FormRowFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2019. | ||
* | ||
* @author Syber | ||
*/ | ||
|
||
namespace TwbsHelper\Form\View\Helper\Factory; | ||
|
||
class FormRowFactory implements \Zend\ServiceManager\FactoryInterface | ||
{ | ||
/** | ||
* Compatibility with ZF2 (>= 2.2) -> proxy to __invoke | ||
* | ||
* @param \Zend\ServiceManager\ServiceLocatorInterface $oServiceLocator | ||
* @param mixed $sCanonicalName | ||
* @param mixed $sRequestedName | ||
* @return void | ||
*/ | ||
public function createService( | ||
\Zend\ServiceManager\ServiceLocatorInterface $oServiceLocator, | ||
$sCanonicalName = null, | ||
$sRequestedName = null | ||
) { | ||
return $this($oServiceLocator, $sRequestedName); | ||
} | ||
|
||
/** | ||
* Compatibility with ZF3 | ||
* | ||
* @param \Interop\Container\ContainerInterface $oContainer | ||
* @param mixed $sRequestedName | ||
* @param array $aOptions | ||
* @return void | ||
*/ | ||
public function __invoke(\Interop\Container\ContainerInterface $oContainer, $sRequestedName, array $aOptions = null) | ||
{ | ||
$oOptions = $oContainer->get(\TwbsHelper\Options\ModuleOptions::class); | ||
|
||
return new \TwbsHelper\Form\View\Helper\FormRow($oOptions); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters