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


PHP elgg_get_sticky_values函数代码示例

本文整理汇总了PHP中elgg_get_sticky_values函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_get_sticky_values函数的具体用法?PHP elgg_get_sticky_values怎么用?PHP elgg_get_sticky_values使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: pool_prepare_form_vars

/**
 * Pull together variables for the save form
 *
 * @param Pool $entity Pool object
 * @return array $values Array of form values
 */
function pool_prepare_form_vars($entity = null)
{
    $values = array('guid' => null, 'title' => null, 'description' => null, 'interval' => null, 'interval_time' => null, 'time' => null, 'access_id' => null, 'owner_guid' => null, 'container_guid' => null);
    if ($entity) {
        foreach ($values as $name => $value) {
            $values[$name] = $entity->{$name};
        }
    }
    if (elgg_is_sticky_form('task_pool')) {
        $sticky_values = elgg_get_sticky_values('task_pool');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('task_pool');
    return $values;
}
开发者ID:juho-jaakkola,项目名称:elgg-pool,代码行数:23,代码来源:start.php

示例2: groups_prepare_form_vars

/**
 * Prepares variables for the group edit form view.
 *
 * @param mixed $group ElggGroup or null. If a group, uses values from the group.
 * @return array
 */
function groups_prepare_form_vars($group = null)
{
    $values = array('name' => '', 'membership' => ACCESS_PUBLIC, 'vis' => ACCESS_PUBLIC, 'guid' => null, 'entity' => null, 'owner_guid' => elgg_get_logged_in_user_guid(), 'content_access_mode' => ElggGroup::CONTENT_ACCESS_MODE_UNRESTRICTED);
    // handle customizable profile fields
    $fields = elgg_get_config('group');
    if ($fields) {
        foreach ($fields as $name => $type) {
            $values[$name] = '';
        }
    }
    // handle tool options
    $tools = elgg_get_config('group_tool_options');
    if ($tools) {
        foreach ($tools as $group_option) {
            $option_name = $group_option->name . "_enable";
            $values[$option_name] = $group_option->default_on ? 'yes' : 'no';
        }
    }
    // get current group settings
    if ($group) {
        foreach (array_keys($values) as $field) {
            if (isset($group->{$field})) {
                $values[$field] = $group->{$field};
            }
        }
        if ($group->access_id != ACCESS_PUBLIC && $group->access_id != ACCESS_LOGGED_IN) {
            // group only access - this is done to handle access not created when group is created
            $values['vis'] = ACCESS_PRIVATE;
        } else {
            $values['vis'] = $group->access_id;
        }
        // The content_access_mode was introduced in 1.9. This method must be
        // used for backwards compatibility with groups created before 1.9.
        $values['content_access_mode'] = $group->getContentAccessMode();
        $values['entity'] = $group;
    }
    // get any sticky form settings
    if (elgg_is_sticky_form('groups')) {
        $sticky_values = elgg_get_sticky_values('groups');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('groups');
    return $values;
}
开发者ID:nirajkaushal,项目名称:Elgg,代码行数:52,代码来源:groups.php

示例3: scheduling_prepare_form_vars

/**
 * Pull together variables for the save form
 *
 * @param ElggEntity $schedule
 * @return array $values
 */
function scheduling_prepare_form_vars(ElggEntity $schedule = null)
{
    $values = array('guid' => 0, 'title' => '', 'description' => '', 'owner_guid' => elgg_get_logged_in_user_guid(), 'container_guid' => 0, 'access_id' => ACCESS_PUBLIC);
    if ($schedule) {
        foreach ($values as $field => $value) {
            if (isset($schedule->{$field})) {
                $values[$field] = $schedule->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('scheduling')) {
        $sticky_values = elgg_get_sticky_values('scheduling');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('scheduling');
    return $values;
}
开发者ID:lorea,项目名称:Hydra-dev,代码行数:25,代码来源:scheduling.php

示例4: markdown_wiki_group_settings_prepare_form_vars

/**
 * Prepare the group settings form variables
 *
 * @param ElggObject $group A group object.
 * @return array
 */
function markdown_wiki_group_settings_prepare_form_vars($group = null)
{
    $values = array('markdown_wiki_all_enabled' => get_input('markdown_wiki_all_enabled', false));
    if ($group) {
        foreach (array_keys($values) as $field) {
            if (isset($group->{$field})) {
                $values[$field] = $group->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('markdown_wiki_settings')) {
        $sticky_values = elgg_get_sticky_values('markdown_wiki_settings');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('markdown_wiki_settings');
    return $values;
}
开发者ID:akudan,项目名称:elgg-markdown_wiki,代码行数:25,代码来源:utilities.php

示例5: golfscore_prepare_form_vars

/**
 * Prepare the add/edit form variables
 *
 * @param ElggObject $golfscore golfscore object.
 * @return array
 */
function golfscore_prepare_form_vars($golfscore = null)
{
    $values = array('title' => get_input('title', ''), 'address' => get_input('address', ''), 'description' => '', 'access_id' => ACCESS_DEFAULT, 'tags' => '', 'shares' => array(), 'container_guid' => elgg_get_page_owner_guid(), 'guid' => null, 'entity' => $golfscore);
    if ($golfscore) {
        foreach (array_keys($values) as $field) {
            if (isset($golfscore->{$field})) {
                $values[$field] = $golfscore->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('golfscore')) {
        $sticky_values = elgg_get_sticky_values('golfscore');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('golfscore');
    return $values;
}
开发者ID:duanhv,项目名称:mdg-social,代码行数:25,代码来源:golfscore.php

示例6: answers_prepare_form_vars

/**
 * Prepare the add/edit form variables
 *
 * @param ElggObject $question A question object.
 * @return array
 */
function answers_prepare_form_vars($question = null)
{
    $values = array('title' => get_input('search', ''), 'description' => '', 'access_id' => ACCESS_DEFAULT, 'tags' => '', 'container_guid' => elgg_get_page_owner_guid(), 'guid' => null, 'entity' => $question);
    if ($question) {
        foreach (array_keys($values) as $field) {
            if (isset($question->{$field})) {
                $values[$field] = $question->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('question')) {
        $sticky_values = elgg_get_sticky_values('question');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('question');
    return $values;
}
开发者ID:hejosadi,项目名称:PiGo-LMS,代码行数:25,代码来源:answers.php

示例7: pages_prepare_form_vars

/**
 * Prepare the add/edit form variables
 *
 * @param ElggObject $page
 * @return array
 */
function pages_prepare_form_vars($page = null, $parent_guid = 0)
{
    // input names => defaults
    $values = array('title' => '', 'description' => '', 'access_id' => ACCESS_DEFAULT, 'write_access_id' => ACCESS_DEFAULT, 'tags' => '', 'container_guid' => elgg_get_page_owner_guid(), 'guid' => null, 'entity' => $page, 'parent_guid' => $parent_guid);
    if ($page) {
        foreach (array_keys($values) as $field) {
            if (isset($page->{$field})) {
                $values[$field] = $page->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('page')) {
        $sticky_values = elgg_get_sticky_values('page');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('page');
    return $values;
}
开发者ID:rcolomoc,项目名称:Master-Red-Social,代码行数:26,代码来源:pages.php

示例8: sched_conf_prepare_edit_form_vars

/**
 * Pull together variables for the edit form
 *
 * @param ElggObject       $event
 * @return array
 */
function sched_conf_prepare_edit_form_vars($conf = NULL)
{
    // input names => defaults
    $values = array('title' => NULL, 'description' => NULL, 'application' => NULL, 'application_code' => NULL, 'immediate' => NULL, 'start_date' => NULL, 'start_time_h' => NULL, 'start_time_m' => NULL, 'tags' => NULL, 'access_id' => ACCESS_DEFAULT, 'group_guid' => NULL, 'guid' => NULL, 'start_time' => NULL);
    if ($conf) {
        foreach (array_keys($values) as $field) {
            if (isset($conf->{$field})) {
                $values[$field] = $conf->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('sched_conf')) {
        $sticky_values = elgg_get_sticky_values('sched_conf');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('sched_conf');
    return $values;
}
开发者ID:nachopavon,项目名称:elgg-sched_conf-plugin,代码行数:26,代码来源:model.php

示例9: amapnews_prepare_form_vars

/**
 * Add amapnews form parameters
 * 
 * @param type $entity_unit
 * @return type
 */
function amapnews_prepare_form_vars($entity_unit = null)
{
    // input names => defaults
    $values = array('title' => '', 'description' => '', 'excerpt' => '', 'featured' => '', 'photo' => '', 'tags' => '', 'connected_guid' => null, 'access_id' => ACCESS_DEFAULT, 'container_guid' => elgg_get_page_owner_guid(), 'entity' => $entity_unit, 'guid' => null, 'comments_on' => NULL);
    if ($entity_unit) {
        foreach (array_keys($values) as $field) {
            if (isset($entity_unit->{$field})) {
                $values[$field] = $entity_unit->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('amapnews')) {
        $sticky_values = elgg_get_sticky_values('amapnews');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('amapnews');
    return $values;
}
开发者ID:nlybe,项目名称:elgg-news,代码行数:26,代码来源:amapnews.php

示例10: videos_prepare_form_vars

/**
 * Prepare the add/edit form variables
 *
 * @param ElggObject $video A video object.
 * @return array
 */
function videos_prepare_form_vars($video = null)
{
    // input names => defaults
    $values = array('title' => get_input('title', ''), 'video_url' => get_input('video_url', ''), 'description' => '', 'access_id' => ACCESS_DEFAULT, 'tags' => '', 'container_guid' => elgg_get_page_owner_guid(), 'guid' => null, 'entity' => $video);
    if ($video) {
        foreach (array_keys($values) as $field) {
            if (isset($video->{$field})) {
                $values[$field] = $video->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('videos')) {
        $sticky_values = elgg_get_sticky_values('videos');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('videos');
    return $values;
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:26,代码来源:videos.php

示例11: tasks_prepare_form_vars

/**
 * Prepare the add/edit form variables
 *
 * @param ElggObject $task
 * @return array
 */
function tasks_prepare_form_vars($task = null, $parent_guid = 0)
{
    // input names => defaults
    $values = array('title' => '', 'description' => '', 'start_date' => '', 'end_date' => '', 'task_type' => '', 'status' => '', 'assigned_to' => '', 'percent_done' => '', 'work_remaining' => '', 'access_id' => ACCESS_DEFAULT, 'write_access_id' => ACCESS_DEFAULT, 'tags' => '', 'container_guid' => elgg_get_page_owner_guid(), 'guid' => null, 'entity' => $task, 'parent_guid' => $parent_guid);
    if ($task) {
        foreach (array_keys($values) as $field) {
            if (isset($task->{$field})) {
                $values[$field] = $task->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('task')) {
        $sticky_values = elgg_get_sticky_values('task');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('task');
    return $values;
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:26,代码来源:tasks.php

示例12: vouchers_prepare_form_vars

function vouchers_prepare_form_vars($voucher = null)
{
    // input names => defaults
    $values = array('title' => '', 'code' => '', 'code_type' => '', 'code_end' => '', 'description' => '', 'amount' => '', 'amount_type' => '', 'access_id' => ACCESS_DEFAULT, 'tags' => '', 'container_guid' => elgg_get_page_owner_guid(), 'entity' => $voucher, 'valid_from' => '', 'valid_until' => '', 'price' => 0, 'points' => 0, 'howmany' => '', 'currency' => '', 'weburl' => '', 'vimage' => '', 'qrcode' => '', 'zone' => '', 'terms' => '', 'excerpt' => '', 'guid' => null, 'comments_on' => NULL);
    if ($voucher) {
        foreach (array_keys($values) as $field) {
            if (isset($voucher->{$field})) {
                $values[$field] = $voucher->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('vouchers')) {
        $sticky_values = elgg_get_sticky_values('vouchers');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('vouchers');
    return $values;
}
开发者ID:nlybe,项目名称:Elgg-Vouchers,代码行数:20,代码来源:vouchers.php

示例13: sharemaps_prepare_form_vars_drawmap

/**
 * Prepare the map creation form variables
 * 
 * @param type $drawmap
 * @return type
 */
function sharemaps_prepare_form_vars_drawmap($drawmap = null)
{
    // input names => defaults
    $values = array('title' => '', 'description' => '', 'access_id' => ACCESS_DEFAULT, 'tags' => '', 'container_guid' => elgg_get_page_owner_guid(), 'guid' => null, 'dm_markers' => '', 'entity' => $drawmap);
    if ($drawmap) {
        foreach (array_keys($values) as $field) {
            if (isset($drawmap->{$field})) {
                $values[$field] = $drawmap->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('drawmap')) {
        $sticky_values = elgg_get_sticky_values('drawmap');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('drawmap');
    return $values;
}
开发者ID:nlybe,项目名称:elgg-sharemaps,代码行数:26,代码来源:sharemaps.php

示例14: discussion_prepare_form_vars

/**
 * Prepare discussion topic form variables
 *
 * @param ElggObject $topic Topic object if editing
 * @return array
 */
function discussion_prepare_form_vars($topic = NULL)
{
    // input names => defaults
    $values = array('title' => '', 'description' => '', 'status' => '', 'access_id' => ACCESS_DEFAULT, 'tags' => '', 'container_guid' => elgg_get_page_owner_guid(), 'guid' => null, 'topic' => $topic);
    if ($topic) {
        foreach (array_keys($values) as $field) {
            if (isset($topic->{$field})) {
                $values[$field] = $topic->{$field};
            }
        }
    }
    if (elgg_is_sticky_form('topic')) {
        $sticky_values = elgg_get_sticky_values('topic');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('topic');
    return $values;
}
开发者ID:elgg,项目名称:groups,代码行数:26,代码来源:discussion.php

示例15: projects_prepare_form_vars

/**
 * Prepare the add/edit form variables
 *
 * @param ElggObject $project
 * @return array
 */
function projects_prepare_form_vars($project = null, $parent_guid = 0)
{
    // input names => defaults
    $values = array('title' => '', 'description' => '', 'project_type' => '', 'cost' => '', 'organization' => '', 'funding' => '', 'status' => '', 'start_date' => '', 'end_date' => '', 'assigned_to[]' => '', 'access_id' => ACCESS_DEFAULT, 'write_access_id' => ACCESS_DEFAULT, 'tags' => '', 'upload' => '', 'container_guid' => elgg_get_page_owner_guid(), 'guid' => null, 'entity' => $project, 'parent_guid' => $parent_guid);
    if ($project) {
        foreach (array_keys($values) as $field) {
            if (isset($project->{$field})) {
                $values[$field] = $project->{$field};
            }
        }
        $opis = elgg_get_entities_from_relationship(array("relationship" => "opi", "relationship_guid" => $project->guid, "inverse_relationship" => true));
        $values['opis'] = $opis;
    }
    if (elgg_is_sticky_form('project')) {
        $sticky_values = elgg_get_sticky_values('project');
        foreach ($sticky_values as $key => $value) {
            $values[$key] = $value;
        }
    }
    elgg_clear_sticky_form('project');
    return $values;
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:28,代码来源:projects.php


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