本文整理汇总了PHP中Setting::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getAll方法的具体用法?PHP Setting::getAll怎么用?PHP Setting::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Setting
的用法示例。
在下文中一共展示了Setting::getAll方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
$settings = Setting::getAll("groups");
foreach ($settings as $setting) {
Setting::set($setting->name, getInput($setting->name));
}
forward("admin/groups");
}
示例2: __construct
function __construct()
{
$settings = Setting::getAll("stripe");
foreach ($settings as $setting) {
Setting::set($setting->name, getInput($setting->name));
}
new SystemMessage("Your stripe settings have been saved.");
forward();
}
示例3: denyDirect
* SocialApparatus CONFIDENTIAL
* __________________
*
* [2002] - [2017] SocialApparatus (http://SocialApparatus.co)
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property of SocialApparatus
* and its suppliers, if any. The intellectual and technical concepts contained herein
* are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign
* Patents, patents in process, and are protected by trade secret or copyright law.
*
* Dissemination of this information or reproduction of this material is strictly forbidden
* unless prior written permission is obtained from SocialApparatus.
*
* Contact Shane Barron admin@socia.us for more information.
*/
namespace SocialApparatus;
denyDirect();
$access = getIgnoreAccess();
setIgnoreAccess();
$system_settings = Setting::getAll("video_settings");
setIgnoreAccess($access);
if ($system_settings) {
foreach ($system_settings as $name => $setting) {
echo display("input/" . $setting->field_type, array("name" => $setting->name, "value" => $setting->value, "class" => "form-control", "label" => isset($setting->label) ? $setting->label : translate("admin:video_settings:" . $setting->name), "options_values" => $setting->options));
}
echo display("input/submit", array("class" => "btn btn-success", "label" => "Save"));
} else {
echo "<blockquote>These settings are created by plugins.</blockquote>";
}
示例4: denyDirect
<?php
/* * ***********************************************************************
*
* SocialApparatus CONFIDENTIAL
* __________________
*
* [2002] - [2017] SocialApparatus (http://SocialApparatus.co)
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property of SocialApparatus
* and its suppliers, if any. The intellectual and technical concepts contained herein
* are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign
* Patents, patents in process, and are protected by trade secret or copyright law.
*
* Dissemination of this information or reproduction of this material is strictly forbidden
* unless prior written permission is obtained from SocialApparatus.
*
* Contact Shane Barron admin@socia.us for more information.
*/
namespace SocialApparatus;
denyDirect();
$settings = Setting::getAll("stripe");
foreach ($settings as $setting) {
echo display("input/{$setting->field_type}", array("name" => $setting->name, "options_values" => $setting->options, "class" => "form-control", "label" => translate("admin_setting_label:" . $setting->name), "value" => $setting->value));
}
echo display("input/submit", array("class" => "btn btn-success", "label" => "Save"));
示例5: assignSettings
/**
* All settings are available in any template
* @return void
*/
protected function assignSettings()
{
$aSettings = Setting::getAll();
$settings[] = array();
foreach ($aSettings as $oSetting) {
$settings[$oSetting->name] = $oSetting->value;
}
$this->assign('settings', $settings);
}
示例6: getSettings
public function getSettings()
{
return Setting::getAll(array('setting_category_id' => $this->getId()));
}
示例7: getAll
static function getAll($owner)
{
return Setting::getAll(USERDATA_OPTION, $owner);
}
示例8: denyDirect
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*
*
* @author Shane Barron <admin@SocialApparatus.co>
* @author Aaustin Barron <aaustin@SocialApparatus.co>
* @copyright 2015 SocialApparatus
* @license http://opensource.org/licenses/MIT MIT
* @version 1
* @link http://SocialApparatus.co
*/
namespace SocialApparatus;
denyDirect();
$ecommerce_settings = Setting::getAll("ecommerce");
if ($ecommerce_settings) {
foreach ($ecommerce_settings as $name => $setting) {
if ($setting->value) {
$value = $setting->value;
} else {
$value = $setting->default;
}
echo display("input/" . $setting->field_type, array("name" => $setting->name, "value" => $value, "class" => "form-control", "label" => translate("admin:ecommerce_settings:" . $setting->name), "options_values" => $setting->options));
}
echo display("input/submit", array("class" => "btn btn-success", "label" => "Save"));
}
示例9: denyDirect
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property of SocialApparatus
* and its suppliers, if any. The intellectual and technical concepts contained herein
* are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign
* Patents, patents in process, and are protected by trade secret or copyright law.
*
* Dissemination of this information or reproduction of this material is strictly forbidden
* unless prior written permission is obtained from SocialApparatus.
*
* Contact Shane Barron admin@socia.us for more information.
*/
namespace SocialApparatus;
denyDirect();
$system_settings = Setting::getAll("general");
if ($system_settings) {
foreach ($system_settings as $name => $setting) {
$options_values = array();
if ($setting->value) {
$value = $setting->value;
} else {
$value = $setting->default;
}
$options = $setting->options;
if (is_array($options)) {
foreach ($options as $key => $value2) {
$options_values[$key] = translate($value2);
}
}
echo display("input/" . $setting->field_type, array("name" => $setting->name, "value" => $value, "class" => "form-control", "label" => translate("admin:general_settings:" . $setting->name), "options_values" => $options_values));
示例10: indexAction
public function indexAction()
{
$settings = Setting::getAll();
$this->view->settings = $settings;
}
示例11: denyDirect
/* * ***********************************************************************
*
* SocialApparatus CONFIDENTIAL
* __________________
*
* [2002] - [2017] SocialApparatus (http://SocialApparatus.co)
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property of SocialApparatus
* and its suppliers, if any. The intellectual and technical concepts contained herein
* are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign
* Patents, patents in process, and are protected by trade secret or copyright law.
*
* Dissemination of this information or reproduction of this material is strictly forbidden
* unless prior written permission is obtained from SocialApparatus.
*
* Contact Shane Barron admin@socia.us for more information.
*/
namespace SocialApparatus;
denyDirect();
$add_this_settings = Setting::getAll("addthis");
if ($add_this_settings) {
foreach ($add_this_settings as $name => $setting) {
echo display("input/" . $setting->field_type, array("name" => $setting->name, "value" => $setting->value, "class" => "form-control", "label" => translate("admin:general_settings:" . $setting->name), "options_values" => $setting->options));
}
echo display("input/submit", array("class" => "btn btn-success", "label" => "Save"));
} else {
echo "<blockquote>These settings are created by plugins.</blockquote>";
}
示例12: showSettings
protected function showSettings()
{
switch ($this->mode) {
case 'bewerken':
$oSetting = new Setting($this->editId);
//$this->assign('backUrl', '/beheer/instellingen/');
$this->editObject($oSetting);
break;
default:
$aSettingCategories = SettingCategory::getAll(null, 'id');
$aSettings = Setting::getAll(array('setting_category_id' => 0));
$this->assign('aSettingCategories', $aSettingCategories);
$this->assign('aSettings', $aSettings);
$this->template = '/instellingen.tpl';
$this->showOutput();
}
}
示例13: denyDirect
*
* [2002] - [2007] SocialApparatus (http://SocialApparatus.co)
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property of SocialApparatus
* and its suppliers, if any. The intellectual and technical concepts contained herein
* are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign
* Patents, patents in process, and are protected by trade secret or copyright law.
*
* Dissemination of this information or reproduction of this material is strictly forbidden
* unless prior written permission is obtained from SocialApparatus.
*
* Contact Shane Barron admin@socia.us for more information.
*/
namespace SocialApparatus;
denyDirect();
$system_settings = Setting::getAll("adsense");
if ($system_settings) {
foreach ($system_settings as $name => $setting) {
if ($setting->value) {
$value = $setting->value;
} else {
$value = $setting->default;
}
echo display("input/" . $setting->field_type, array("name" => $setting->name, "value" => $value, "class" => "form-control", "label" => translate("admin:adsense_settings:" . $setting->name), "options_values" => $setting->options));
}
echo display("input/submit", array("class" => "btn btn-success", "label" => "Save"));
} else {
echo "<blockquote>These settings are created by plugins.</blockquote>";
}
示例14: getAll
/**
* @return 2d array of all settings for owner
*/
static function getAll($owner)
{
return Setting::getAll(USER, $owner);
}