Add upstream plugins

Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
2019-10-25 22:42:20 +02:00
parent 5d3c2ec184
commit 290736650a
1186 changed files with 302577 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
/**
* Missing class setting-renderer description.
*
* @author Time.ly Network Inc.
* @since 2.2
*
* @package AI1EC
* @subpackage AI1EC.
*/
class Ai1ec_Html_Setting_Renderer extends Ai1ec_Base {
/**
* Renders single setting.
*
* @param array $setting Setting structure.
*
* @return string Rendered content.
*
* @throws Ai1ec_Bootstrap_Exception
*/
public function render( array $setting ) {
$renderer_name = $setting['renderer']['class'];
$renderer = null;
try {
$renderer = $this->_registry->get(
'html.element.setting.' . $renderer_name,
$setting
);
} catch ( Ai1ec_Bootstrap_Exception $exception ) {
$renderer = $this->_registry->get(
'html.element.setting.input',
$setting
);
}
return $renderer->render();
}
}