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


PHP Groups::getGroup方法代码示例

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


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

示例1: renderOrganisation

function renderOrganisation($type, $organisation = '', $organisation_owner = '', $target = '', $show_buttons = true)
{
    if (!$organisation) {
        $organisation = Groups::getGroup($type, '', $organisation_owner);
    }
    $key_name = Groups::keyField($type);
    $id = $organisation->{$key_name};
    if ($organisation) {
        $s = '';
        if ($show_buttons && user_access('vals admin register')) {
            $pPath = request_path();
            $edit_action = "onclick='ajaxCall(\"administration\", \"edit\", {type: \"{$type}\", id: {$id}, path: \"{$pPath}\", target: \"{$target}\"}, " . ($type == _STUDENT_GROUP ? "\"{$target}\");'" : "\"formResult\", \"html\", \"{$target}\");'");
            $s .= "<div class='totheright'>";
            $s .= "\t<input type='button' value='" . t('edit') . "' {$edit_action}/>";
            // has the org signup period ended if so user cant add/delete entries, only edit
            if (vals_soc_access_check("dashboard/{$type}/administer/add_or_delete")) {
                $delete_action = "onclick='if(confirm(\"" . tt('Are you sure you want to delete this %1$s?', t_type($type)) . "\")){ajaxCall(\"administration\", \"delete\", {type: \"{$type}\", id: {$id}, path: \"{$pPath}\", target: \"{$target}\"}, \"refreshTabs\", \"json\", [\"{$type}\", \"{$target}\", \"administration\"]);}'";
                $s .= "\t<input type='button' value='" . t('delete') . "' {$delete_action}/>";
            }
            $s .= "</div>";
            //$sub_type_user = '';
        }
        $s .= formatMemberRecordNice($organisation, $type, $target);
        if ($type == _STUDENT_GROUP) {
            $s .= "<h2>" . t('Members') . "</h2>";
            $students = Users::getStudents($id);
            $s .= renderStudents('', $students);
        }
        return $s;
    } else {
        return tt('You have no %1$s registered yet', $type);
    }
}
开发者ID:edwinraycom,项目名称:vals-soc,代码行数:33,代码来源:render_functions.php

示例2: Groups

<?php

require_once '../classes/db/Groups.php';
require_once '../classes/Helper.php';
Helper::checkAuthorisation();
if ($_GET) {
    $groups = new Groups();
    switch ($_GET['type']) {
        case 'id':
            Helper::checkGetParameter('id');
            $group = $groups->getGroup($_GET['id']);
            echo json_encode($group);
            break;
        case 'driver':
            Helper::checkGetParameter('driver_id');
            $response = ['list' => $groups->getGroups($_GET['driver_id'])];
            echo json_encode($response);
            break;
        case 'all':
            $response = ['list' => $groups->getAllGroups()];
            echo json_encode($response);
            break;
    }
}
开发者ID:vgartner,项目名称:gpsHub,代码行数:24,代码来源:groups.php

示例3:

        <div class="col-sm-3 col-md-2 sidebar panel" style="margin-bottom:0px;">
          <ul class="nav nav-sidebar">
            <li><a href="/Views/User/dashboard.php">Overview <span class="sr-only">(current)</span></a></li>
            <li><a href="/Views/User/profile.php">Profile</a></li>
            <li><a href="/Views/Friends/manager.php">Friends</a></li>
            <li class="active"><a href="/Views/Groups/manager.php">Groups</a></li>
            <li><a href="/Views/Events/manager.php">Events</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li><a href="/Views/Business/manager.php">Buisness</a></li>
          </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">

          <?php 
$results = $groups->getGroup();
// Edit only for admin
$adminCheck = $groups->isAdmin();
echo "<script>console.log('isAdmin: " . $adminCheck . "');</script>";
if ($adminCheck) {
    echo '<div class="row">';
    echo '<div class="col-md-12"><a class="btn btn-info btn-raised" style="float: right;" data-toggle="modal" data-dismiss="modal" data-target="#EditG">Edit Group</a></div>';
    echo '</div>';
}
?>

            <div class="row placeholders panel panel-primary" style="margin-top:15px;">
              <!-- <div class="" style="margin-bottom:20px;"></div> -->
              <div class="panel-body">
              <div class="col-xs-6 col-sm-3 placeholder" style="margin:40px 0px; border-right: solid 2px gainsboro;">
                <?php 
开发者ID:ejalfonzo,项目名称:GroupFinder,代码行数:31,代码来源:open.php

示例4: renderForm

         //     		if(isset($_POST['path'])){
         //     			$form['#action'] = url($_POST['path']);
         //     		}
         //unset($_POST);
         renderForm($form, $target);
     }
     break;
 case 'edit':
     $type = altSubValue($_POST, 'type', '');
     $id = altSubValue($_POST, 'id', '');
     $target = altSubValue($_POST, 'target', '');
     if (!isValidOrganisationType($type)) {
         //for convenience we have made a project an organisationtype as well //TODO: make this better
         echo tt('There is no such type to edit : %1$s', $type);
     } else {
         $obj = Groups::getGroup($type, $id);
         // See http://drupal.stackexchange.com/questions/98592/ajax-processed-not-added-on-a-form-inside-a-custom-callback-my-module-deliver
         // for additions below
         $originalPath = false;
         if (isset($_POST['path'])) {
             $originalPath = $_POST['path'];
         }
         unset($_POST);
         $form = drupal_get_form("vals_soc_{$type}_form", $obj, $target);
         if ($originalPath) {
             $form['#action'] = url($originalPath);
         }
         // Process the submit button which uses ajax
         //$form['submit'] = ajax_pre_render_element($form['submit']);
         // Build renderable array
         //         	$build = array(
开发者ID:edwinraycom,项目名称:vals-soc,代码行数:31,代码来源:administration_actions.php


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