当前位置: 首页>>代码示例>>PHP>>正文


PHP ElggGroup::setPrivateSetting方法代码示例

本文整理汇总了PHP中ElggGroup::setPrivateSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP ElggGroup::setPrivateSetting方法的具体用法?PHP ElggGroup::setPrivateSetting怎么用?PHP ElggGroup::setPrivateSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ElggGroup的用法示例。


在下文中一共展示了ElggGroup::setPrivateSetting方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMerchantAccount

 /**
  * Retrieve a Stripe account for this mercant
  *
  * @return Stripe_Customer|boolean
  * @throws Stripe_Error
  */
 public function getMerchantAccount()
 {
     if ($this->account->id) {
         return $this->account;
     }
     if (!$this->entity) {
         return false;
     }
     if (!($access_token = $this->getAccessToken())) {
         return false;
     }
     try {
         $stripe = new StripeClient();
         $stripe->setAccessToken($access_token);
         $account = $stripe->getAccount();
         if (!$account->id || isset($account->deleted)) {
             throw new Stripe_Error('Account does not exist or has been deleted');
         }
         $this->account = $account;
         return $this->account;
     } catch (Stripe_Error $e) {
         $this->entity->setPrivateSetting('stripe_secret_key', null);
         $this->entity->setPrivateSetting('stripe_publishable_key', null);
         return false;
     }
 }
开发者ID:Daltonmedia,项目名称:stripe,代码行数:32,代码来源:StripeMerchant.php

示例2: foreach

    foreach ($tool_options as $group_option) {
        $option_toggle_name = $group_option->name . "_enable";
        $option_default = $group_option->default_on ? 'yes' : 'no';
        $group->{$option_toggle_name} = get_input($option_toggle_name, $option_default);
    }
}
// Group membership - should these be treated with same constants as access permissions?
$is_public_membership = get_input('membership') == ACCESS_PUBLIC;
$group->membership = $is_public_membership ? ACCESS_PUBLIC : ACCESS_PRIVATE;
$group->setContentAccessMode(get_input('content_access_mode'));
if ($is_new_group) {
    $group->access_id = ACCESS_PUBLIC;
}
// default access
$default_access = (int) get_input('group_default_access');
$group->setPrivateSetting("elgg_default_access", $default_access);
if ($is_new_group) {
    // if new group, we need to save so group acl gets set in event handler
    $group->save();
}
// Invisible group support
// @todo this requires save to be called to create the acl for the group. This
// is an odd requirement and should be removed. Either the acl creation happens
// in the action or the visibility moves to a plugin hook
if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') {
    $visibility = (int) get_input('vis');
    if ($visibility == ACCESS_PRIVATE) {
        // Make this group visible only to group members. We need to use
        // ACCESS_PRIVATE on the form and convert it to group_acl here
        // because new groups do not have acl until they have been saved once.
        $visibility = $group->group_acl;
开发者ID:pleio,项目名称:group_tools,代码行数:31,代码来源:edit.php


注:本文中的ElggGroup::setPrivateSetting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。