Produce a list of Notes related to a selected Member

@param $memberId string UUID of Member
@return \Illuminate\Http\Response List of Notes
961711
public function index($memberId)
    {
        $member = Member::findOrFail($memberId);
        $this->authorize('view', $member);
        return $this->respondRelatedNotes($memberId, 'member');
    }
696436
public function flushMemberCache($memberIDs = null)
    {
        $cache = SiteTree::singleton()->getCreatableChildrenCache();

        if (!$memberIDs) {
            $cache->clear();
            return;
        }

        foreach ($memberIDs as $memberID) {
            $key = $this->generateChildrenCacheKey($memberID);
            $cache->delete($key);
        }
    }
1046609
public function formAction($resourceId, User $user)
    {
        $likeManager = $this->getLikeActionManager();
        $criteria = ['resource' => $resourceId];
        $userLike = $likeManager->getLikeBy($user, null, $criteria);
        $likesQB = $likeManager->getLikesForPagination(null, $criteria);
        $pager = $this->paginateQuery($likesQB, 1);

        return ['resourceId' => $resourceId, 'pager' => $pager, 'userLike' => $userLike];
    }
1142611
public function listOrganizationMenuItems($organizationId, $menuId)
    {
        list($response) = $this->listOrganizationMenuItemsWithHttpInfo($organizationId, $menuId);
        return $response;
    }
242953
public static function getChildPageIds($pageId)
    {
        if (empty(self::$preloaded_page_children)) {
            foreach (static::preloadArray() as $key => $page) {
                if (!isset(self::$preloaded_page_children[$page->parent])) {
                    self::$preloaded_page_children[$page->parent] = [];
                }
                self::$preloaded_page_children[$page->parent][] = $page->id;
            }
        }
        return !empty(self::$preloaded_page_children[$pageId]) ? self::$preloaded_page_children[$pageId] : [];
    }
333133
public function findOrganizationPage($organizationId, $pageId)
    {
        list($response) = $this->findOrganizationPageWithHttpInfo($organizationId, $pageId);
        return $response;
    }
951367
public function destroy($memberTagId, $id)
    {
        $member = Member::findOrFail($id);
        $this->authorize('detachMemberTagMember', $member);
        /** @noinspection PhpUndefinedMethodInspection */
        $member->member_tags()->detach($memberTagId);
        return fractal($member->id, new DeletedTransformer())
            ->withResourceName('deletedMember')
            ->respond();
    }
84765
public function getFolders($databaseConnectionName = null, $organizationId = null)
  {
    $file = array();

    if(empty($organizationId))
    {
      $organizationId = $this->AuthenticationManager->getCurrentUserOrganizationId();
    }

    $this->File->byTypeAndByOrganization('C', $organizationId, $databaseConnectionName)->each(function($File) use (&$file)
    {
      array_push($file, array('label'=> $File->name , 'value'=>$File->id));
    });

    return $file;
  }
1230055
public function remove($id, $memberId)
    {
        return $this->delete($this->getPath($id).'/'.rawurlencode($memberId));
    }
521184
protected static function create_note_list($courseid, $context, $userid, $state, $author = 0) {
        $results = array();
        $notes = note_list($courseid, $userid, $state, $author);
        foreach ($notes as $key => $note) {
            $note = (array)$note;
            list($note['content'], $note['format']) = external_format_text($note['content'],
                                                                           $note['format'],
                                                                           $context->id,
                                                                           '',
                                                                           '',
                                                                           0);
            $results[$key] = $note;
        }
        return $results;
    }
1023950
public function listAction($pageId = NULL)
    {
        $pages = $this->getDoctrine()->getRepository('FulgurioLightCMSBundle:Page')->findBy(array('page_type' => 'page'), array('position' => 'ASC'));
        $childrenPages = array();
        foreach ($pages as $page)
        {
            if ($page->isRoot())
            {
                $pageRoot = $page;
            }
            if (!is_null($pageId) && $page->getId() == $pageId)
            {
                $currentPage = $page;
            }
            if (!isset($childrenPages[$page->getParentId()]))
            {
                $childrenPages[$page->getParentId()] = array();
            }
            $childrenPages[$page->getParentId()][] = $page;
        }
        $data = array(
            'pageRoot' => array($pageRoot),
            'childrenPages' => $childrenPages
        );
        if (!is_null($pageId))
        {
            if (!isset($currentPage))
            {
                throw new NotFoundHttpException($this->get('translator')->trans('fulgurio.lightcms.page_not_found', array(), 'admin'));
            }
            $models = $this->container->getParameter('fulgurio_light_cms.models');
            $templateName = isset($models[$currentPage->getModel()]['back']['view']) ? $models[$currentPage->getModel()]['back']['view'] : 'FulgurioLightCMSBundle:models:standardAdminView.html.twig';
            $data['selectedPage'] = $currentPage;
        }
        else
        {
            $templateName = 'FulgurioLightCMSBundle:AdminPage:list.html.twig';
        }
        return $this->render($templateName, $data);
    }
65645
public function index($memberTagId)
    {
        $memberTag = MemberTag::findOrFail($memberTagId);
        $this->authorize('index', $memberTag);
        $memberTag->load('members');
        return fractal($memberTag->members, new MemberTransformer())
            ->withResourceName('memberTagMember')
            ->respond();
    }
378674
public function getList($callId, $legId, $recordingId, $parameters = array())
    {
        list($status, , $body) = $this->HttpClient->performHttpRequest(
            Common\HttpClient::REQUEST_GET,
            "calls/$callId/legs/$legId/recordings/$recordingId/transcriptions",
            $parameters
        );

        if ($status === 200) {
            $body = json_decode($body);

            $items = $body->data;
            unset($body->data);

            $baseList = new Objects\BaseList();
            $baseList->loadFromArray($body);

            $objectName = $this->Object;

            foreach ($items as $item) {
                $object = new $objectName($this->HttpClient);

                $itemObject = $object->loadFromArray($item);
                $baseList->items[] = $itemObject;
            }
            return $baseList;
        }

        return $this->processRequest($body);
    }
437438
static function fetchListForUser( $userID )
    {
        return eZPersistentObject::fetchObjectList( eZContentBrowseRecent::definition(),
                                                    null, array( 'user_id' => $userID ),
                                                    array( 'created' => 'desc' ), null, true );
    }
1309034
public static function getComments($itemId){
        $comments = Comment::where('item_id', $itemId)->orderBy('parent_id', 'asc')->get();

        foreach ($comments as $comment){
            $userId = $comment->user_id;
            $user = self::getUser($userId);
            $comment->name = $user['name'];
            $comment->email = $user['email'];
            $comment->url = $user['url'];

            if($user['avatar'] == 'gravatar'){
                $hash = md5(strtolower(trim($user['email'])));
                $comment->avatar = "http://www.gravatar.com/avatar/$hash?d=identicon";
            }
        }

        return $comments;
    }
653935
public function get_all_submissions($userid) {
        global $DB, $USER;

        // If the userid is not null then use userid.
        if (!$userid) {
            $userid = $USER->id;
        }

        $params = array();

        if ($this->get_instance()->teamsubmission) {
            $groupid = 0;
            $group = $this->get_submission_group($userid);
            if ($group) {
                $groupid = $group->id;
            }

            // Params to get the group submissions.
            $params = array('assignment'=>$this->get_instance()->id, 'groupid'=>$groupid, 'userid'=>0);
        } else {
            // Params to get the user submissions.
            $params = array('assignment'=>$this->get_instance()->id, 'userid'=>$userid);
        }

        // Return the submissions ordered by attempt.
        $submissions = $DB->get_records('assign_submission', $params, 'attemptnumber ASC');

        return $submissions;
    }
181552
public static function get_children_of_user($userid) {
        global $DB;

        // Get users that the user has role assignments to.
        $allusernames = get_all_user_name_fields(true, 'u');
        $sql = "SELECT u.id, $allusernames
                  FROM {role_assignments} ra, {context} c, {user} u
                 WHERE ra.userid = :userid
                       AND ra.contextid = c.id
                       AND c.instanceid = u.id
                       AND c.contextlevel = :contextlevel";
        $params = [
            'userid' => $userid,
            'contextlevel' => CONTEXT_USER
        ];

        // The final list of users that we will return.
        $finalresults = [];

        // Our prospective list of users.
        if ($candidates = $DB->get_records_sql($sql, $params)) {
            foreach ($candidates as $key => $child) {
                $childcontext = \context_user::instance($child->id);
                if (has_capability('tool/dataprivacy:makedatarequestsforchildren', $childcontext, $userid)) {
                    $finalresults[$key] = $child;
                }
            }
        }
        return $finalresults;
    }