id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
192,000
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.getCollectionAction
public function getCollectionAction($start, $count, Request $request) { $contents = []; $format = $this->getFormatParam(); $response = $this->createJsonResponse(); $categoryName = $request->query->get('category', null); $usePagination = $request->query->get('usePagination', t...
php
public function getCollectionAction($start, $count, Request $request) { $contents = []; $format = $this->getFormatParam(); $response = $this->createJsonResponse(); $categoryName = $request->query->get('category', null); $usePagination = $request->query->get('usePagination', t...
[ "public", "function", "getCollectionAction", "(", "$", "start", ",", "$", "count", ",", "Request", "$", "request", ")", "{", "$", "contents", "=", "[", "]", ";", "$", "format", "=", "$", "this", "->", "getFormatParam", "(", ")", ";", "$", "response", ...
Returns collection of classcontent associated to category and according to provided criterias. @return Symfony\Component\HttpFoundation\Response @Rest\Pagination(default_count=25, max_count=100) @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Returns", "collection", "of", "classcontent", "associated", "to", "category", "and", "according", "to", "provided", "criterias", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L118-L141
192,001
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.getAction
public function getAction($type, $uid, Request $request) { $this->granted('VIEW', $content = $this->getClassContentByTypeAndUid($type, $uid, true)); $response = null; if (in_array('text/html', $request->getAcceptableContentTypes())) { if (false != $pageUid = $request->query->get...
php
public function getAction($type, $uid, Request $request) { $this->granted('VIEW', $content = $this->getClassContentByTypeAndUid($type, $uid, true)); $response = null; if (in_array('text/html', $request->getAcceptableContentTypes())) { if (false != $pageUid = $request->query->get...
[ "public", "function", "getAction", "(", "$", "type", ",", "$", "uid", ",", "Request", "$", "request", ")", "{", "$", "this", "->", "granted", "(", "'VIEW'", ",", "$", "content", "=", "$", "this", "->", "getClassContentByTypeAndUid", "(", "$", "type", "...
Get classcontent. @param string $type type of the class content (ex: Element/text) @param string $uid identifier of the class content @return Symfony\Component\HttpFoundation\Response @Rest\QueryParam(name="mode", description="The render mode to use") @Rest\QueryParam(name="page_uid", description="The page to set t...
[ "Get", "classcontent", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L178-L200
192,002
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.postAction
public function postAction($type, Request $request) { $classname = AbstractClassContent::getClassnameByContentType($type); $content = new $classname(); $this->granted('CREATE', $content); $this->getEntityManager()->persist($content); $content->setDraft($this->getClassContent...
php
public function postAction($type, Request $request) { $classname = AbstractClassContent::getClassnameByContentType($type); $content = new $classname(); $this->granted('CREATE', $content); $this->getEntityManager()->persist($content); $content->setDraft($this->getClassContent...
[ "public", "function", "postAction", "(", "$", "type", ",", "Request", "$", "request", ")", "{", "$", "classname", "=", "AbstractClassContent", "::", "getClassnameByContentType", "(", "$", "type", ")", ";", "$", "content", "=", "new", "$", "classname", "(", ...
Creates classcontent according to provided type. @param string $type @param Request $request @return Symfony\Component\HttpFoundation\Response @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Creates", "classcontent", "according", "to", "provided", "type", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L212-L247
192,003
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.putAction
public function putAction($type, $uid, Request $request) { $this->updateClassContent($type, $uid, $request->request->all()); $this->getEntityManager()->flush(); return $this->createJsonResponse(null, 204); }
php
public function putAction($type, $uid, Request $request) { $this->updateClassContent($type, $uid, $request->request->all()); $this->getEntityManager()->flush(); return $this->createJsonResponse(null, 204); }
[ "public", "function", "putAction", "(", "$", "type", ",", "$", "uid", ",", "Request", "$", "request", ")", "{", "$", "this", "->", "updateClassContent", "(", "$", "type", ",", "$", "uid", ",", "$", "request", "->", "request", "->", "all", "(", ")", ...
Updates classcontent's elements and parameters. @param string $type type of the class content (ex: Element/text) @param string $uid identifier of the class content @return Symfony\Component\HttpFoundation\JsonResponse @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Updates", "classcontent", "s", "elements", "and", "parameters", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L259-L265
192,004
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.putCollectionAction
public function putCollectionAction(Request $request) { $result = []; foreach ($request->request->all() as $data) { if (!isset($data['type']) || !isset($data['uid'])) { throw new BadRequestHttpException("type and/or uid is missing."); } try { ...
php
public function putCollectionAction(Request $request) { $result = []; foreach ($request->request->all() as $data) { if (!isset($data['type']) || !isset($data['uid'])) { throw new BadRequestHttpException("type and/or uid is missing."); } try { ...
[ "public", "function", "putCollectionAction", "(", "Request", "$", "request", ")", "{", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "request", "->", "request", "->", "all", "(", ")", "as", "$", "data", ")", "{", "if", "(", "!", "isset", ...
Updates collection of classcontent elements and parameters. @param Request $request @return Symfony\Component\HttpFoundation\JsonResponse @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Updates", "collection", "of", "classcontent", "elements", "and", "parameters", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L276-L315
192,005
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.deleteAction
public function deleteAction($type, $uid) { $this->granted('DELETE', $content = $this->getClassContentByTypeAndUid($type, $uid)); try { $this->getEntityManager()->getRepository('BackBee\ClassContent\AbstractClassContent')->deleteContent($content); $this->getEntityManager()->...
php
public function deleteAction($type, $uid) { $this->granted('DELETE', $content = $this->getClassContentByTypeAndUid($type, $uid)); try { $this->getEntityManager()->getRepository('BackBee\ClassContent\AbstractClassContent')->deleteContent($content); $this->getEntityManager()->...
[ "public", "function", "deleteAction", "(", "$", "type", ",", "$", "uid", ")", "{", "$", "this", "->", "granted", "(", "'DELETE'", ",", "$", "content", "=", "$", "this", "->", "getClassContentByTypeAndUid", "(", "$", "type", ",", "$", "uid", ")", ")", ...
delete a classcontent. @param string $type type of the class content (ex: Element/text) @param string $uid identifier of the class content @return Symfony\Component\HttpFoundation\JsonResponse @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "delete", "a", "classcontent", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L327-L339
192,006
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.getDraftAction
public function getDraftAction($type, $uid) { $this->granted('VIEW', $content = $this->getClassContentByTypeAndUid($type, $uid)); return $this->createJsonResponse($this->getClassContentManager()->getDraft($content)); }
php
public function getDraftAction($type, $uid) { $this->granted('VIEW', $content = $this->getClassContentByTypeAndUid($type, $uid)); return $this->createJsonResponse($this->getClassContentManager()->getDraft($content)); }
[ "public", "function", "getDraftAction", "(", "$", "type", ",", "$", "uid", ")", "{", "$", "this", "->", "granted", "(", "'VIEW'", ",", "$", "content", "=", "$", "this", "->", "getClassContentByTypeAndUid", "(", "$", "type", ",", "$", "uid", ")", ")", ...
ClassContent's draft getter. @param string $type type of the class content (ex: Element/text) @param string $uid identifier of the class content @return Symfony\Component\HttpFoundation\JsonResponse @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "ClassContent", "s", "draft", "getter", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L351-L356
192,007
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.getDraftCollectionAction
public function getDraftCollectionAction() { $contents = $this->getEntityManager() ->getRepository('BackBee\ClassContent\Revision') ->getAllDrafts($this->getApplication()->getBBUserToken()) ; $contents = $this->sortDraftCollection($contents); return $this->a...
php
public function getDraftCollectionAction() { $contents = $this->getEntityManager() ->getRepository('BackBee\ClassContent\Revision') ->getAllDrafts($this->getApplication()->getBBUserToken()) ; $contents = $this->sortDraftCollection($contents); return $this->a...
[ "public", "function", "getDraftCollectionAction", "(", ")", "{", "$", "contents", "=", "$", "this", "->", "getEntityManager", "(", ")", "->", "getRepository", "(", "'BackBee\\ClassContent\\Revision'", ")", "->", "getAllDrafts", "(", "$", "this", "->", "getApplicat...
Returns all drafts of current user. @return Symfony\Component\HttpFoundation\JsonResponse @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Returns", "all", "drafts", "of", "current", "user", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L365-L375
192,008
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.putDraftAction
public function putDraftAction($type, $uid, Request $request) { $this->updateClassContentDraft($type, $uid, $request->request->all()); $this->getEntityManager()->flush(); return $this->createJsonResponse(null, 204); }
php
public function putDraftAction($type, $uid, Request $request) { $this->updateClassContentDraft($type, $uid, $request->request->all()); $this->getEntityManager()->flush(); return $this->createJsonResponse(null, 204); }
[ "public", "function", "putDraftAction", "(", "$", "type", ",", "$", "uid", ",", "Request", "$", "request", ")", "{", "$", "this", "->", "updateClassContentDraft", "(", "$", "type", ",", "$", "uid", ",", "$", "request", "->", "request", "->", "all", "("...
Updates a classcontent's draft. @param string $type type of the class content (ex: Element/text) @param string $uid identifier of the class content @return Symfony\Component\HttpFoundation\JsonResponse @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Updates", "a", "classcontent", "s", "draft", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L387-L393
192,009
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.patchDraftAction
public function patchDraftAction($type, $uid, Request $request) { $operations = $request->request->all(); try { (new OperationSyntaxValidator())->validate($operations); } catch (InvalidOperationSyntaxException $e) { throw new BadRequestHttpException('operation invali...
php
public function patchDraftAction($type, $uid, Request $request) { $operations = $request->request->all(); try { (new OperationSyntaxValidator())->validate($operations); } catch (InvalidOperationSyntaxException $e) { throw new BadRequestHttpException('operation invali...
[ "public", "function", "patchDraftAction", "(", "$", "type", ",", "$", "uid", ",", "Request", "$", "request", ")", "{", "$", "operations", "=", "$", "request", "->", "request", "->", "all", "(", ")", ";", "try", "{", "(", "new", "OperationSyntaxValidator"...
Set draft of a content to a specific revision @param string $type Type of the class content (ex: Element/text) @param string $uid Unique identifier of the class content @param Request $request The current request, parameter `revision` will be looked for. Possible values for `revision` are: * negative value...
[ "Set", "draft", "of", "a", "content", "to", "a", "specific", "revision" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L410-L443
192,010
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.putDraftCollectionAction
public function putDraftCollectionAction(Request $request) { $result = []; foreach ($request->request->all() as $data) { if (!isset($data['type']) || !isset($data['uid'])) { throw new BadRequestHttpException("type and/or uid is missing."); } try {...
php
public function putDraftCollectionAction(Request $request) { $result = []; foreach ($request->request->all() as $data) { if (!isset($data['type']) || !isset($data['uid'])) { throw new BadRequestHttpException("type and/or uid is missing."); } try {...
[ "public", "function", "putDraftCollectionAction", "(", "Request", "$", "request", ")", "{", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "request", "->", "request", "->", "all", "(", ")", "as", "$", "data", ")", "{", "if", "(", "!", "isset...
Updates collection of classcontents' drafts. @param Request $request @return Symfony\Component\HttpFoundation\JsonResponse @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Updates", "collection", "of", "classcontents", "drafts", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L454-L490
192,011
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.getClassContentManager
private function getClassContentManager() { if (null === $this->manager) { $this->manager = $this->getApplication()->getContainer()->get('classcontent.manager') ->setBBUserToken($this->getApplication()->getBBUserToken()) ; } return $this->manager; ...
php
private function getClassContentManager() { if (null === $this->manager) { $this->manager = $this->getApplication()->getContainer()->get('classcontent.manager') ->setBBUserToken($this->getApplication()->getBBUserToken()) ; } return $this->manager; ...
[ "private", "function", "getClassContentManager", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "manager", ")", "{", "$", "this", "->", "manager", "=", "$", "this", "->", "getApplication", "(", ")", "->", "getContainer", "(", ")", "->", "g...
Returns ClassContentManager. @return BackBee\ClassContent\ClassContentManager
[ "Returns", "ClassContentManager", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L507-L516
192,012
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.sortDraftCollection
private function sortDraftCollection(array $drafts) { $sortedDrafts = []; $filteredDrafts = []; foreach ($drafts as $draft) { if (null === $draft->getContent()) { continue; } $sortedDrafts[$draft->getContent()->getUid()] = [$draft->getCon...
php
private function sortDraftCollection(array $drafts) { $sortedDrafts = []; $filteredDrafts = []; foreach ($drafts as $draft) { if (null === $draft->getContent()) { continue; } $sortedDrafts[$draft->getContent()->getUid()] = [$draft->getCon...
[ "private", "function", "sortDraftCollection", "(", "array", "$", "drafts", ")", "{", "$", "sortedDrafts", "=", "[", "]", ";", "$", "filteredDrafts", "=", "[", "]", ";", "foreach", "(", "$", "drafts", "as", "$", "draft", ")", "{", "if", "(", "null", "...
Sorts the provided array that contains current logged user's drafts. @param array $drafts @return array
[ "Sorts", "the", "provided", "array", "that", "contains", "current", "logged", "user", "s", "drafts", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L525-L565
192,013
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.updateClassContent
private function updateClassContent($type, $uid, $data) { $this->granted('EDIT', $content = $this->getClassContentByTypeAndUid($type, $uid, true, true)); $this->getClassContentManager()->update($content, $data); return $content; }
php
private function updateClassContent($type, $uid, $data) { $this->granted('EDIT', $content = $this->getClassContentByTypeAndUid($type, $uid, true, true)); $this->getClassContentManager()->update($content, $data); return $content; }
[ "private", "function", "updateClassContent", "(", "$", "type", ",", "$", "uid", ",", "$", "data", ")", "{", "$", "this", "->", "granted", "(", "'EDIT'", ",", "$", "content", "=", "$", "this", "->", "getClassContentByTypeAndUid", "(", "$", "type", ",", ...
Updates and returns content and its draft according to provided data. @param string $type @param string $uid @param array $data @return AbstractClassContent
[ "Updates", "and", "returns", "content", "and", "its", "draft", "according", "to", "provided", "data", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L576-L582
192,014
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.updateClassContentDraft
private function updateClassContentDraft($type, $uid, $data) { $this->granted('VIEW', $content = $this->getClassContentByTypeAndUid($type, $uid)); $this->granted('EDIT', $content); $operation = $data['operation']; if (!in_array($operation, ['commit', 'revert'])) { throw ...
php
private function updateClassContentDraft($type, $uid, $data) { $this->granted('VIEW', $content = $this->getClassContentByTypeAndUid($type, $uid)); $this->granted('EDIT', $content); $operation = $data['operation']; if (!in_array($operation, ['commit', 'revert'])) { throw ...
[ "private", "function", "updateClassContentDraft", "(", "$", "type", ",", "$", "uid", ",", "$", "data", ")", "{", "$", "this", "->", "granted", "(", "'VIEW'", ",", "$", "content", "=", "$", "this", "->", "getClassContentByTypeAndUid", "(", "$", "type", ",...
Commits or reverts content's draft according to provided data. @param string $type @param string $uid @param array $data @return AbstractClassContent
[ "Commits", "or", "reverts", "content", "s", "draft", "according", "to", "provided", "data", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L593-L606
192,015
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.getClassContentByCategory
private function getClassContentByCategory($name, $start, $count) { return $this->findContentsByCriteria($this->getClassContentClassnamesByCategory($name), $start, $count); }
php
private function getClassContentByCategory($name, $start, $count) { return $this->findContentsByCriteria($this->getClassContentClassnamesByCategory($name), $start, $count); }
[ "private", "function", "getClassContentByCategory", "(", "$", "name", ",", "$", "start", ",", "$", "count", ")", "{", "return", "$", "this", "->", "findContentsByCriteria", "(", "$", "this", "->", "getClassContentClassnamesByCategory", "(", "$", "name", ")", "...
Returns classcontent by category. @param string $name category's name @param integer $start @param integer $count @return null|Paginator
[ "Returns", "classcontent", "by", "category", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L647-L650
192,016
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.getClassContentClassnamesByCategory
private function getClassContentClassnamesByCategory($name) { try { return $this->getCategoryManager()->getClassContentClassnamesByCategory($name); } catch (\InvalidArgumentException $e) { throw new NotFoundHttpException($e->getMessage()); } }
php
private function getClassContentClassnamesByCategory($name) { try { return $this->getCategoryManager()->getClassContentClassnamesByCategory($name); } catch (\InvalidArgumentException $e) { throw new NotFoundHttpException($e->getMessage()); } }
[ "private", "function", "getClassContentClassnamesByCategory", "(", "$", "name", ")", "{", "try", "{", "return", "$", "this", "->", "getCategoryManager", "(", ")", "->", "getClassContentClassnamesByCategory", "(", "$", "name", ")", ";", "}", "catch", "(", "\\", ...
Returns all classcontents classnames that belong to provided category. @param string $name The category name @return array
[ "Returns", "all", "classcontents", "classnames", "that", "belong", "to", "provided", "category", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L659-L666
192,017
backbee/backbee-php
Rest/Controller/ClassContentController.php
ClassContentController.findContentsByCriteria
private function findContentsByCriteria(array $classnames, $start, $count) { $criterias = array_merge([ 'only_online' => false, 'site_uid' => $this->getApplication()->getSite()->getUid(), ], $this->getRequest()->query->all()); $criterias['only_online'] = (boolean)...
php
private function findContentsByCriteria(array $classnames, $start, $count) { $criterias = array_merge([ 'only_online' => false, 'site_uid' => $this->getApplication()->getSite()->getUid(), ], $this->getRequest()->query->all()); $criterias['only_online'] = (boolean)...
[ "private", "function", "findContentsByCriteria", "(", "array", "$", "classnames", ",", "$", "start", ",", "$", "count", ")", "{", "$", "criterias", "=", "array_merge", "(", "[", "'only_online'", "=>", "false", ",", "'site_uid'", "=>", "$", "this", "->", "g...
Find classcontents by provided classnames, criterias from request, provided start and count. @param array $classnames @param integer $start @param integer $count @return null|Paginator
[ "Find", "classcontents", "by", "provided", "classnames", "criterias", "from", "request", "provided", "start", "and", "count", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/ClassContentController.php#L716-L755
192,018
backbee/backbee-php
Rest/Controller/UserController.php
UserController.getCurrentAction
public function getCurrentAction() { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to access'); } $user = $this->getEntityManager()->find(get_class($this->getUser()), $this->getUser()->getId()); ...
php
public function getCurrentAction() { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to access'); } $user = $this->getEntityManager()->find(get_class($this->getUser()), $this->getUser()->getId()); ...
[ "public", "function", "getCurrentAction", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isGranted", "(", "'IS_AUTHENTICATED_FULLY'", ")", ")", "{", "throw", "new", "InsufficientAuthenticationException", "(", "'You must be authenticated to access'", ")", ";", "}...
GET current User.
[ "GET", "current", "User", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/UserController.php#L97-L106
192,019
backbee/backbee-php
Rest/Controller/UserController.php
UserController.getAction
public function getAction($id) { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to delete users'); } $user = $this->getEntityManager()->find(get_class($this->getUser()), $id); if (!$user) { ...
php
public function getAction($id) { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to delete users'); } $user = $this->getEntityManager()->find(get_class($this->getUser()), $id); if (!$user) { ...
[ "public", "function", "getAction", "(", "$", "id", ")", "{", "if", "(", "!", "$", "this", "->", "isGranted", "(", "'IS_AUTHENTICATED_FULLY'", ")", ")", "{", "throw", "new", "InsufficientAuthenticationException", "(", "'You must be authenticated to delete users'", ")...
GET User. @param int $id User ID
[ "GET", "User", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/UserController.php#L113-L130
192,020
backbee/backbee-php
Rest/Controller/UserController.php
UserController.deleteAction
public function deleteAction($id) { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to delete users'); } if (intval($id) === $this->getUser()->getId()) { throw new InsufficientAuthenticationE...
php
public function deleteAction($id) { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to delete users'); } if (intval($id) === $this->getUser()->getId()) { throw new InsufficientAuthenticationE...
[ "public", "function", "deleteAction", "(", "$", "id", ")", "{", "if", "(", "!", "$", "this", "->", "isGranted", "(", "'IS_AUTHENTICATED_FULLY'", ")", ")", "{", "throw", "new", "InsufficientAuthenticationException", "(", "'You must be authenticated to delete users'", ...
DELETE User. @param int $id User ID
[ "DELETE", "User", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/UserController.php#L137-L161
192,021
backbee/backbee-php
Rest/Controller/UserController.php
UserController.putAction
public function putAction($id, Request $request) { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to view users'); } $user = $this->getEntityManager()->find(get_class($this->getUser()), $id); i...
php
public function putAction($id, Request $request) { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to view users'); } $user = $this->getEntityManager()->find(get_class($this->getUser()), $id); i...
[ "public", "function", "putAction", "(", "$", "id", ",", "Request", "$", "request", ")", "{", "if", "(", "!", "$", "this", "->", "isGranted", "(", "'IS_AUTHENTICATED_FULLY'", ")", ")", "{", "throw", "new", "InsufficientAuthenticationException", "(", "'You must ...
UPDATE User. @Rest\RequestParam(name = "login", requirements = { @Assert\NotBlank(message="Login is required"), @Assert\Length(min=6, minMessage="Minimum length of the login is 6 characters") }) @Rest\RequestParam(name = "email", requirements = { @Assert\NotBlank(message="Email not provided"), @Assert\Email(checkMX=tr...
[ "UPDATE", "User", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/UserController.php#L193-L226
192,022
backbee/backbee-php
Rest/Controller/UserController.php
UserController.postAction
public function postAction(Request $request) { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to view users'); } $userExists = $this->getApplication() ->getEntityManager() ...
php
public function postAction(Request $request) { if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) { throw new InsufficientAuthenticationException('You must be authenticated to view users'); } $userExists = $this->getApplication() ->getEntityManager() ...
[ "public", "function", "postAction", "(", "Request", "$", "request", ")", "{", "if", "(", "!", "$", "this", "->", "isGranted", "(", "'IS_AUTHENTICATED_FULLY'", ")", ")", "{", "throw", "new", "InsufficientAuthenticationException", "(", "'You must be authenticated to v...
Create User. @Rest\RequestParam(name = "login", requirements = { @Assert\NotBlank(message="Login is required"), @Assert\Length(min=6, minMessage="Your login must be at least 6 characters") }) @Rest\RequestParam(name = "email", requirements = { @Assert\NotBlank(message="Email not provided"), @Assert\Email(checkMX=true,...
[ "Create", "User", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/UserController.php#L240-L291
192,023
backbee/backbee-php
Serializer/SerializerBuilder.php
SerializerBuilder.addMetadataDir
public function addMetadataDir($dir, $namespacePrefix = '') { if (! is_dir($dir)) { throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir)); } if (isset($this->metadataDirs[$namespacePrefix])) { throw new InvalidArgumentException(sprin...
php
public function addMetadataDir($dir, $namespacePrefix = '') { if (! is_dir($dir)) { throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir)); } if (isset($this->metadataDirs[$namespacePrefix])) { throw new InvalidArgumentException(sprin...
[ "public", "function", "addMetadataDir", "(", "$", "dir", ",", "$", "namespacePrefix", "=", "''", ")", "{", "if", "(", "!", "is_dir", "(", "$", "dir", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "'The directory \"%s\" does ...
Adds a directory where the serializer will look for class metadata. The namespace prefix will make the names of the actual metadata files a bit shorter. For example, let's assume that you have a directory where you only store metadata files for the ``MyApplication\Entity`` namespace. If you use an empty prefix, your ...
[ "Adds", "a", "directory", "where", "the", "serializer", "will", "look", "for", "class", "metadata", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Serializer/SerializerBuilder.php#L289-L302
192,024
backbee/backbee-php
Rest/Controller/SiteController.php
SiteController.getLayoutsAction
public function getLayoutsAction($uid) { if (!$this->isGranted("ROLE_API_USER")) { throw new AccessDeniedHttpException("Your account's api access is disabled"); } $site = $this->getEntityManager()->getRepository('BackBee\Site\Site')->find($uid); if (!$site) { ...
php
public function getLayoutsAction($uid) { if (!$this->isGranted("ROLE_API_USER")) { throw new AccessDeniedHttpException("Your account's api access is disabled"); } $site = $this->getEntityManager()->getRepository('BackBee\Site\Site')->find($uid); if (!$site) { ...
[ "public", "function", "getLayoutsAction", "(", "$", "uid", ")", "{", "if", "(", "!", "$", "this", "->", "isGranted", "(", "\"ROLE_API_USER\"", ")", ")", "{", "throw", "new", "AccessDeniedHttpException", "(", "\"Your account's api access is disabled\"", ")", ";", ...
Get site layouts.
[ "Get", "site", "layouts", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/SiteController.php#L42-L76
192,025
backbee/backbee-php
Rest/Controller/SiteController.php
SiteController.getCollectionAction
public function getCollectionAction() { if (!$this->isGranted('ROLE_API_USER')) { throw new AccessDeniedHttpException('Your account\'s api access is disabled'); } $sitesAvailable = []; $sites = $this->getEntityManager()->getRepository('BackBee\Site\Site')->findAll(); ...
php
public function getCollectionAction() { if (!$this->isGranted('ROLE_API_USER')) { throw new AccessDeniedHttpException('Your account\'s api access is disabled'); } $sitesAvailable = []; $sites = $this->getEntityManager()->getRepository('BackBee\Site\Site')->findAll(); ...
[ "public", "function", "getCollectionAction", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isGranted", "(", "'ROLE_API_USER'", ")", ")", "{", "throw", "new", "AccessDeniedHttpException", "(", "'Your account\\'s api access is disabled'", ")", ";", "}", "$", ...
retrieve all Site visible for the current user @return Response
[ "retrieve", "all", "Site", "visible", "for", "the", "current", "user" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/SiteController.php#L83-L97
192,026
backbee/backbee-php
ClassContent/Repository/ClassContentQueryBuilder.php
ClassContentQueryBuilder.addSiteFilter
public function addSiteFilter($site) { if ($site instanceof Site) { $site = $site->getUid(); } if (!empty($site)) { $this->andWhere( 'cc._uid IN (SELECT i.content_uid FROM BackBee\ClassContent\Indexes\IdxSiteContent i WHERE i.site_uid = :site_uid)' ...
php
public function addSiteFilter($site) { if ($site instanceof Site) { $site = $site->getUid(); } if (!empty($site)) { $this->andWhere( 'cc._uid IN (SELECT i.content_uid FROM BackBee\ClassContent\Indexes\IdxSiteContent i WHERE i.site_uid = :site_uid)' ...
[ "public", "function", "addSiteFilter", "(", "$", "site", ")", "{", "if", "(", "$", "site", "instanceof", "Site", ")", "{", "$", "site", "=", "$", "site", "->", "getUid", "(", ")", ";", "}", "if", "(", "!", "empty", "(", "$", "site", ")", ")", "...
Add site filter to the query. @param mixed $site (BackBee/Site/Site|String)
[ "Add", "site", "filter", "to", "the", "query", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/ClassContentQueryBuilder.php#L75-L86
192,027
backbee/backbee-php
ClassContent/Repository/ClassContentQueryBuilder.php
ClassContentQueryBuilder.limitToOnline
public function limitToOnline() { $this->leftJoin('cc._mainnode', 'mp'); $this->andWhere('mp._state IN (:states)') ->setParameter('states', array(Page::STATE_ONLINE, Page::STATE_ONLINE | Page::STATE_HIDDEN)); $this->andWhere('mp._publishing < :today OR mp._publishing IS NULL') ...
php
public function limitToOnline() { $this->leftJoin('cc._mainnode', 'mp'); $this->andWhere('mp._state IN (:states)') ->setParameter('states', array(Page::STATE_ONLINE, Page::STATE_ONLINE | Page::STATE_HIDDEN)); $this->andWhere('mp._publishing < :today OR mp._publishing IS NULL') ...
[ "public", "function", "limitToOnline", "(", ")", "{", "$", "this", "->", "leftJoin", "(", "'cc._mainnode'", ",", "'mp'", ")", ";", "$", "this", "->", "andWhere", "(", "'mp._state IN (:states)'", ")", "->", "setParameter", "(", "'states'", ",", "array", "(", ...
Add limite to onlinne filter.
[ "Add", "limite", "to", "onlinne", "filter", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/ClassContentQueryBuilder.php#L101-L108
192,028
backbee/backbee-php
ClassContent/Repository/ClassContentQueryBuilder.php
ClassContentQueryBuilder.addPageFilter
public function addPageFilter(Page $page) { if ($page && !$page->isRoot()) { $this->leftJoin('cc._mainnode', 'p') ->leftJoin('p._section', 'sp') ->andWhere('sp._root = :selectedPageRoot') ->andWhere('sp._leftnode >= :selectedPageLeftnod...
php
public function addPageFilter(Page $page) { if ($page && !$page->isRoot()) { $this->leftJoin('cc._mainnode', 'p') ->leftJoin('p._section', 'sp') ->andWhere('sp._root = :selectedPageRoot') ->andWhere('sp._leftnode >= :selectedPageLeftnod...
[ "public", "function", "addPageFilter", "(", "Page", "$", "page", ")", "{", "if", "(", "$", "page", "&&", "!", "$", "page", "->", "isRoot", "(", ")", ")", "{", "$", "this", "->", "leftJoin", "(", "'cc._mainnode'", ",", "'p'", ")", "->", "leftJoin", ...
Set a page to filter the query on a nested portion. @param BackBee\NestedNode\Page $page
[ "Set", "a", "page", "to", "filter", "the", "query", "on", "a", "nested", "portion", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/ClassContentQueryBuilder.php#L115-L129
192,029
backbee/backbee-php
ClassContent/Repository/ClassContentQueryBuilder.php
ClassContentQueryBuilder.addKeywordsFilter
public function addKeywordsFilter($keywords) { $contentIds = $this->_em->getRepository('BackBee\NestedNode\KeyWord') ->getContentsIdByKeyWords($keywords); if (is_array($contentIds) && !empty($contentIds)) { $this->andWhere('cc._uid in(:keywords)')->setPara...
php
public function addKeywordsFilter($keywords) { $contentIds = $this->_em->getRepository('BackBee\NestedNode\KeyWord') ->getContentsIdByKeyWords($keywords); if (is_array($contentIds) && !empty($contentIds)) { $this->andWhere('cc._uid in(:keywords)')->setPara...
[ "public", "function", "addKeywordsFilter", "(", "$", "keywords", ")", "{", "$", "contentIds", "=", "$", "this", "->", "_em", "->", "getRepository", "(", "'BackBee\\NestedNode\\KeyWord'", ")", "->", "getContentsIdByKeyWords", "(", "$", "keywords", ")", ";", "if",...
Filter the query by keywords. @param array $keywords
[ "Filter", "the", "query", "by", "keywords", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/ClassContentQueryBuilder.php#L136-L143
192,030
backbee/backbee-php
ClassContent/Repository/ClassContentQueryBuilder.php
ClassContentQueryBuilder.addClassFilter
public function addClassFilter($classes) { if (is_array($classes) && count($classes) !== 0) { $filters = array(); foreach ($classes as $class) { class_exists($class); $filters[] = 'cc INSTANCE OF \''. $class .'\''; } $filter =...
php
public function addClassFilter($classes) { if (is_array($classes) && count($classes) !== 0) { $filters = array(); foreach ($classes as $class) { class_exists($class); $filters[] = 'cc INSTANCE OF \''. $class .'\''; } $filter =...
[ "public", "function", "addClassFilter", "(", "$", "classes", ")", "{", "if", "(", "is_array", "(", "$", "classes", ")", "&&", "count", "(", "$", "classes", ")", "!==", "0", ")", "{", "$", "filters", "=", "array", "(", ")", ";", "foreach", "(", "$",...
Filter by rhe classname descriminator. @param array $classes
[ "Filter", "by", "rhe", "classname", "descriminator", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/ClassContentQueryBuilder.php#L150-L163
192,031
backbee/backbee-php
ClassContent/Repository/ClassContentQueryBuilder.php
ClassContentQueryBuilder.orderByIndex
public function orderByIndex($label, $sort = 'ASC') { $this->join('cc._indexation', 'idx') ->andWhere('idx._field = :sort') ->setParameter('sort', $label) ->orderBy('idx._value', $sort); }
php
public function orderByIndex($label, $sort = 'ASC') { $this->join('cc._indexation', 'idx') ->andWhere('idx._field = :sort') ->setParameter('sort', $label) ->orderBy('idx._value', $sort); }
[ "public", "function", "orderByIndex", "(", "$", "label", ",", "$", "sort", "=", "'ASC'", ")", "{", "$", "this", "->", "join", "(", "'cc._indexation'", ",", "'idx'", ")", "->", "andWhere", "(", "'idx._field = :sort'", ")", "->", "setParameter", "(", "'sort'...
Order with the indexation table. @param string $label @param string $sort ('ASC'|'DESC')
[ "Order", "with", "the", "indexation", "table", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/ClassContentQueryBuilder.php#L171-L177
192,032
backbee/backbee-php
ClassContent/Repository/ClassContentQueryBuilder.php
ClassContentQueryBuilder.paginate
public function paginate($start, $limit, $fetchJoinCollection = true) { $this->setFirstResult($start) ->setMaxResults($limit); return new Paginator($this, $fetchJoinCollection); }
php
public function paginate($start, $limit, $fetchJoinCollection = true) { $this->setFirstResult($start) ->setMaxResults($limit); return new Paginator($this, $fetchJoinCollection); }
[ "public", "function", "paginate", "(", "$", "start", ",", "$", "limit", ",", "$", "fetchJoinCollection", "=", "true", ")", "{", "$", "this", "->", "setFirstResult", "(", "$", "start", ")", "->", "setMaxResults", "(", "$", "limit", ")", ";", "return", "...
Get Results paginated. @param integer $start @param integer $limit @return Doctrine\ORM\Tools\Pagination\Paginator
[ "Get", "Results", "paginated", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/ClassContentQueryBuilder.php#L187-L193
192,033
backbee/backbee-php
ClassContent/Repository/ClassContentQueryBuilder.php
ClassContentQueryBuilder.addTitleLike
public function addTitleLike($expression) { if (null !== $expression) { $this->andWhere( $this->expr()->like( 'cc._label', $this->expr()->literal('%'.$expression.'%') ) ); } }
php
public function addTitleLike($expression) { if (null !== $expression) { $this->andWhere( $this->expr()->like( 'cc._label', $this->expr()->literal('%'.$expression.'%') ) ); } }
[ "public", "function", "addTitleLike", "(", "$", "expression", ")", "{", "if", "(", "null", "!==", "$", "expression", ")", "{", "$", "this", "->", "andWhere", "(", "$", "this", "->", "expr", "(", ")", "->", "like", "(", "'cc._label'", ",", "$", "this"...
Adds filter on title @param string $expression
[ "Adds", "filter", "on", "title" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/ClassContent/Repository/ClassContentQueryBuilder.php#L199-L209
192,034
backbee/backbee-php
Rest/Controller/BundleController.php
BundleController.getCollectionAction
public function getCollectionAction() { $application = $this->getApplication(); $bundles = []; foreach ($this->getApplication()->getBundles() as $bundle) { if ($this->isGranted('EDIT', $bundle) || ($bundle->isEnabled() && $this->isGranted('VIEW', $bundle))) { ...
php
public function getCollectionAction() { $application = $this->getApplication(); $bundles = []; foreach ($this->getApplication()->getBundles() as $bundle) { if ($this->isGranted('EDIT', $bundle) || ($bundle->isEnabled() && $this->isGranted('VIEW', $bundle))) { ...
[ "public", "function", "getCollectionAction", "(", ")", "{", "$", "application", "=", "$", "this", "->", "getApplication", "(", ")", ";", "$", "bundles", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "getApplication", "(", ")", "->", "getBundles"...
Returns a collection of declared bundles. @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Returns", "a", "collection", "of", "declared", "bundles", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/BundleController.php#L61-L76
192,035
backbee/backbee-php
Rest/Controller/BundleController.php
BundleController.patchAction
public function patchAction($id, Request $request) { $bundle = $this->getBundleById($id); $this->granted('EDIT', $bundle); $operations = $request->request->all(); try { (new OperationSyntaxValidator())->validate($operations); } catch (InvalidOperationSyntaxExcep...
php
public function patchAction($id, Request $request) { $bundle = $this->getBundleById($id); $this->granted('EDIT', $bundle); $operations = $request->request->all(); try { (new OperationSyntaxValidator())->validate($operations); } catch (InvalidOperationSyntaxExcep...
[ "public", "function", "patchAction", "(", "$", "id", ",", "Request", "$", "request", ")", "{", "$", "bundle", "=", "$", "this", "->", "getBundleById", "(", "$", "id", ")", ";", "$", "this", "->", "granted", "(", "'EDIT'", ",", "$", "bundle", ")", "...
Patch the bundle. @Rest\RequestParam(name="0", description="Patch operations", requirements={ @Assert\NotBlank(message="Request must contain at least one operation") }) @param string $id the id of the bundle we are looking for @Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
[ "Patch", "the", "bundle", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/BundleController.php#L113-L147
192,036
backbee/backbee-php
Rest/Controller/BundleController.php
BundleController.accessBundleExposedRoutesAction
public function accessBundleExposedRoutesAction($bundleName, $controllerName, $actionName, $parameters) { $bundle = $this->getBundleById($bundleName); $controller = (new BundleControllerResolver($this->getApplication()))->resolve($bundleName, $controllerName); if ($controller instanceof Ab...
php
public function accessBundleExposedRoutesAction($bundleName, $controllerName, $actionName, $parameters) { $bundle = $this->getBundleById($bundleName); $controller = (new BundleControllerResolver($this->getApplication()))->resolve($bundleName, $controllerName); if ($controller instanceof Ab...
[ "public", "function", "accessBundleExposedRoutesAction", "(", "$", "bundleName", ",", "$", "controllerName", ",", "$", "actionName", ",", "$", "parameters", ")", "{", "$", "bundle", "=", "$", "this", "->", "getBundleById", "(", "$", "bundleName", ")", ";", "...
This method is the front controller of every bundles exposed actions. @param string $bundleName name of bundle we want to reach its exposed actions @param string $controllerName controller name @param string $actionName name of exposed action we want to reach @param string $parameters optionnal, action's p...
[ "This", "method", "is", "the", "front", "controller", "of", "every", "bundles", "exposed", "actions", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/BundleController.php#L161-L181
192,037
backbee/backbee-php
Rest/Controller/BundleController.php
BundleController.getBundleById
private function getBundleById($id) { if (null === $bundle = $this->getApplication()->getBundle($id)) { throw new NotFoundHttpException("No bundle exists with id `$id`"); } return $bundle; }
php
private function getBundleById($id) { if (null === $bundle = $this->getApplication()->getBundle($id)) { throw new NotFoundHttpException("No bundle exists with id `$id`"); } return $bundle; }
[ "private", "function", "getBundleById", "(", "$", "id", ")", "{", "if", "(", "null", "===", "$", "bundle", "=", "$", "this", "->", "getApplication", "(", ")", "->", "getBundle", "(", "$", "id", ")", ")", "{", "throw", "new", "NotFoundHttpException", "(...
Returns a bundle by id. @param string $id @throws NotFoundHttpException is raise if no bundle was found with provided id @return BundleInterface
[ "Returns", "a", "bundle", "by", "id", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/BundleController.php#L210-L217
192,038
backbee/backbee-php
Config/Configurator.php
Configurator.doApplicationConfigExtend
private function doApplicationConfigExtend(Config $config) { $config_directories = ConfigDirectory::getDirectories( null, $this->baseRepository, $this->context, $this->environment ); foreach ($config_directories as $directory) { if...
php
private function doApplicationConfigExtend(Config $config) { $config_directories = ConfigDirectory::getDirectories( null, $this->baseRepository, $this->context, $this->environment ); foreach ($config_directories as $directory) { if...
[ "private", "function", "doApplicationConfigExtend", "(", "Config", "$", "config", ")", "{", "$", "config_directories", "=", "ConfigDirectory", "::", "getDirectories", "(", "null", ",", "$", "this", "->", "baseRepository", ",", "$", "this", "->", "context", ",", ...
Do every extend according to application context and envrionment for application's Config. @param Config $config config we want to apply Application Config extend type
[ "Do", "every", "extend", "according", "to", "application", "context", "and", "envrionment", "for", "application", "s", "Config", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Config/Configurator.php#L200-L214
192,039
backbee/backbee-php
Config/Configurator.php
Configurator.overrideConfigByRegistry
private function overrideConfigByRegistry(Config $config, $bundleId, $scopePerContext, $scopePerEnvironment) { $registry = $this->getRegistryConfig($bundleId, $scopePerContext, $scopePerEnvironment); if (null !== $registry) { $registryConfig = @unserialize($registry->getValue()); ...
php
private function overrideConfigByRegistry(Config $config, $bundleId, $scopePerContext, $scopePerEnvironment) { $registry = $this->getRegistryConfig($bundleId, $scopePerContext, $scopePerEnvironment); if (null !== $registry) { $registryConfig = @unserialize($registry->getValue()); ...
[ "private", "function", "overrideConfigByRegistry", "(", "Config", "$", "config", ",", "$", "bundleId", ",", "$", "scopePerContext", ",", "$", "scopePerEnvironment", ")", "{", "$", "registry", "=", "$", "this", "->", "getRegistryConfig", "(", "$", "bundleId", "...
Overrides configuration of bundle from the registry. @param Config $config The Config to be extended. @param string $bundleId The bundle Id. @param boolean $scopePerContext If TRUE use context in registry scope. @param boolean $scopePerEnvironment If TRUE use environment in regsitry s...
[ "Overrides", "configuration", "of", "bundle", "from", "the", "registry", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Config/Configurator.php#L268-L281
192,040
backbee/backbee-php
Config/Configurator.php
Configurator.getRegistryConfig
private function getRegistryConfig($bundleId, $scopePerContext, $scopePerEnvironment) { $registry = null; try { if (null !== $em = $this->application->getEntityManager()) { $registry = $em->getRepository('BackBee\Bundle\Registry')->findOneBy(array( 'k...
php
private function getRegistryConfig($bundleId, $scopePerContext, $scopePerEnvironment) { $registry = null; try { if (null !== $em = $this->application->getEntityManager()) { $registry = $em->getRepository('BackBee\Bundle\Registry')->findOneBy(array( 'k...
[ "private", "function", "getRegistryConfig", "(", "$", "bundleId", ",", "$", "scopePerContext", ",", "$", "scopePerEnvironment", ")", "{", "$", "registry", "=", "null", ";", "try", "{", "if", "(", "null", "!==", "$", "em", "=", "$", "this", "->", "applica...
Returns the registry entry for bundle's config storing. @param string $bundleId The id of the bundle we are looking for override config in registry. @param boolean $scopePerContext If TRUE use context in registry scope. @param boolean $scopePerEnvironment If TRUE use environment in regsitry scope. ...
[ "Returns", "the", "registry", "entry", "for", "bundle", "s", "config", "storing", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Config/Configurator.php#L292-L321
192,041
backbee/backbee-php
NestedNode/Builder/PageBuilder.php
PageBuilder.getPage
public function getPage() { if (null === $this->site || null === $this->layout || null === $this->title) { $this->reset(); throw new \Exception("Required data missing"); } $page = new Page($this->uid); $page->setTitle($this->title); $page->setSite($th...
php
public function getPage() { if (null === $this->site || null === $this->layout || null === $this->title) { $this->reset(); throw new \Exception("Required data missing"); } $page = new Page($this->uid); $page->setTitle($this->title); $page->setSite($th...
[ "public", "function", "getPage", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "site", "||", "null", "===", "$", "this", "->", "layout", "||", "null", "===", "$", "this", "->", "title", ")", "{", "$", "this", "->", "reset", "(", ")"...
Returns the built page instance. @return Page The built page.
[ "Returns", "the", "built", "page", "instance", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Builder/PageBuilder.php#L172-L245
192,042
backbee/backbee-php
NestedNode/Builder/PageBuilder.php
PageBuilder.reset
private function reset() { $this->uid = null; $this->title = null; $this->altTitle = null; $this->redirect = null; $this->target = null; $this->url = null; $this->site = null; $this->root = null; $this->parent = null; $this->layout = nu...
php
private function reset() { $this->uid = null; $this->title = null; $this->altTitle = null; $this->redirect = null; $this->target = null; $this->url = null; $this->site = null; $this->root = null; $this->parent = null; $this->layout = nu...
[ "private", "function", "reset", "(", ")", "{", "$", "this", "->", "uid", "=", "null", ";", "$", "this", "->", "title", "=", "null", ";", "$", "this", "->", "altTitle", "=", "null", ";", "$", "this", "->", "redirect", "=", "null", ";", "$", "this"...
Resets the builder @return PageBuilder The reseted builder instance.
[ "Resets", "the", "builder" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Builder/PageBuilder.php#L269-L291
192,043
backbee/backbee-php
NestedNode/Builder/PageBuilder.php
PageBuilder.setRoot
public function setRoot(Page $root, $isChild = false) { $this->root = $root; if (true === $isChild) { $this->setParent($root); } return $this; }
php
public function setRoot(Page $root, $isChild = false) { $this->root = $root; if (true === $isChild) { $this->setParent($root); } return $this; }
[ "public", "function", "setRoot", "(", "Page", "$", "root", ",", "$", "isChild", "=", "false", ")", "{", "$", "this", "->", "root", "=", "$", "root", ";", "if", "(", "true", "===", "$", "isChild", ")", "{", "$", "this", "->", "setParent", "(", "$"...
Sets the root page. @param Page $root The root page to be set. @param boolean $isChild Optional, if true sets also the parent of the page to $root (false by default). @return PageBuilder The builder instance.
[ "Sets", "the", "root", "page", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Builder/PageBuilder.php#L404-L413
192,044
backbee/backbee-php
NestedNode/Builder/PageBuilder.php
PageBuilder.setLayout
public function setLayout(Layout $layout, AbstractClassContent $toPushInMainZone = null) { $this->layout = $layout; $this->itemToPushInMainZone = $toPushInMainZone; return $this; }
php
public function setLayout(Layout $layout, AbstractClassContent $toPushInMainZone = null) { $this->layout = $layout; $this->itemToPushInMainZone = $toPushInMainZone; return $this; }
[ "public", "function", "setLayout", "(", "Layout", "$", "layout", ",", "AbstractClassContent", "$", "toPushInMainZone", "=", "null", ")", "{", "$", "this", "->", "layout", "=", "$", "layout", ";", "$", "this", "->", "itemToPushInMainZone", "=", "$", "toPushIn...
Sets a layout instance. @param Layout $layout The layout to be set. @param AbstractClassContent|null $toPushInMainZone Optional, content be pushed in main zone. @return PageBuilder The builder instance. @codeCoverageIgnore
[ "Sets", "a", "layout", "instance", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Builder/PageBuilder.php#L487-L493
192,045
backbee/backbee-php
NestedNode/Builder/PageBuilder.php
PageBuilder.pushElement
public function pushElement(AbstractClassContent $element, $setMainNode = false, $contentSetPos = 0) { $this->elements[] = [ 'content' => $element, 'set_main_node' => (true === $setMainNode), 'content_set_position' => $contentSetPos, ]; ...
php
public function pushElement(AbstractClassContent $element, $setMainNode = false, $contentSetPos = 0) { $this->elements[] = [ 'content' => $element, 'set_main_node' => (true === $setMainNode), 'content_set_position' => $contentSetPos, ]; ...
[ "public", "function", "pushElement", "(", "AbstractClassContent", "$", "element", ",", "$", "setMainNode", "=", "false", ",", "$", "contentSetPos", "=", "0", ")", "{", "$", "this", "->", "elements", "[", "]", "=", "[", "'content'", "=>", "$", "element", ...
Push a content into a page. @param AbstractClassContent $element The content to be pushed. @param boolean $setMainNode Optional, is the main node to be set? (false by deault). @param integer $contentSetPos Optional, the column index in which to push content (0 by def...
[ "Push", "a", "content", "into", "a", "page", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Builder/PageBuilder.php#L564-L573
192,046
backbee/backbee-php
NestedNode/Builder/PageBuilder.php
PageBuilder.addElement
public function addElement(AbstractClassContent $element, $index = null, $setMainNode = false, $contentSetPos = 0) { if (null !== $index) { $index = intval($index); if (!array_key_exists($index, $this->elements)) { throw new \InvalidArgumentException(); } ...
php
public function addElement(AbstractClassContent $element, $index = null, $setMainNode = false, $contentSetPos = 0) { if (null !== $index) { $index = intval($index); if (!array_key_exists($index, $this->elements)) { throw new \InvalidArgumentException(); } ...
[ "public", "function", "addElement", "(", "AbstractClassContent", "$", "element", ",", "$", "index", "=", "null", ",", "$", "setMainNode", "=", "false", ",", "$", "contentSetPos", "=", "0", ")", "{", "if", "(", "null", "!==", "$", "index", ")", "{", "$"...
Add a content into a page. @param AbstractClassContent $element The content to be add. @param integer|null $index Optional, if provided replace content at index $index. @param boolean $setMainNode Optional, is the main node to be set? (false by deault). @param int...
[ "Add", "a", "content", "into", "a", "page", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Builder/PageBuilder.php#L587-L605
192,047
backbee/backbee-php
NestedNode/Builder/PageBuilder.php
PageBuilder.getElement
public function getElement($index) { return (array_key_exists((int) $index, $this->elements) ? $this->elements[$index] : null); }
php
public function getElement($index) { return (array_key_exists((int) $index, $this->elements) ? $this->elements[$index] : null); }
[ "public", "function", "getElement", "(", "$", "index", ")", "{", "return", "(", "array_key_exists", "(", "(", "int", ")", "$", "index", ",", "$", "this", "->", "elements", ")", "?", "$", "this", "->", "elements", "[", "$", "index", "]", ":", "null", ...
Gets a content from the page. @param integer $index The index in elements array of the page. @return AbstractClassContent|null
[ "Gets", "a", "content", "from", "the", "page", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Builder/PageBuilder.php#L614-L617
192,048
backbee/backbee-php
NestedNode/Builder/PageBuilder.php
PageBuilder.updateContentRevision
private function updateContentRevision(AbstractClassContent $content, $revision = 1, $state = AbstractClassContent::STATE_NORMAL) { $content->setRevision((int) $revision); $content->setState((int) $state); return $this; }
php
private function updateContentRevision(AbstractClassContent $content, $revision = 1, $state = AbstractClassContent::STATE_NORMAL) { $content->setRevision((int) $revision); $content->setState((int) $state); return $this; }
[ "private", "function", "updateContentRevision", "(", "AbstractClassContent", "$", "content", ",", "$", "revision", "=", "1", ",", "$", "state", "=", "AbstractClassContent", "::", "STATE_NORMAL", ")", "{", "$", "content", "->", "setRevision", "(", "(", "int", "...
Updates states and revision number of the content. @param AbstractClassContent $content The content to be updated. @param integer $revision Optional, the revision number (1 by default). @param integer $state Optional, The state (STATE_NORMAL by default). ...
[ "Updates", "states", "and", "revision", "number", "of", "the", "content", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Builder/PageBuilder.php#L653-L659
192,049
backbee/backbee-php
NestedNode/Builder/PageBuilder.php
PageBuilder.doPersistIfValid
private function doPersistIfValid(Page $page) { if (null === $page->getParent() && !empty($this->persist)) { // If root, only persist $this->em->persist($page); return; } $method = ''; if (self::PERSIST_AS_FIRST_CHILD === $this->persist) { ...
php
private function doPersistIfValid(Page $page) { if (null === $page->getParent() && !empty($this->persist)) { // If root, only persist $this->em->persist($page); return; } $method = ''; if (self::PERSIST_AS_FIRST_CHILD === $this->persist) { ...
[ "private", "function", "doPersistIfValid", "(", "Page", "$", "page", ")", "{", "if", "(", "null", "===", "$", "page", "->", "getParent", "(", ")", "&&", "!", "empty", "(", "$", "this", "->", "persist", ")", ")", "{", "// If root, only persist", "$", "t...
Persists the page is need and valid @param Page $page The page to be built.
[ "Persists", "the", "page", "is", "need", "and", "valid" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Builder/PageBuilder.php#L854-L873
192,050
backbee/backbee-php
Rest/Controller/AbstractRestController.php
AbstractRestController.deserializeEntity
public function deserializeEntity(array $data, $entityOrClass) { $context = null; if (is_object($entityOrClass)) { $context = DeserializationContext::create(); $context->attributes->set('target', $entityOrClass); $context->enableMaxDepthChecks(true); $...
php
public function deserializeEntity(array $data, $entityOrClass) { $context = null; if (is_object($entityOrClass)) { $context = DeserializationContext::create(); $context->attributes->set('target', $entityOrClass); $context->enableMaxDepthChecks(true); $...
[ "public", "function", "deserializeEntity", "(", "array", "$", "data", ",", "$", "entityOrClass", ")", "{", "$", "context", "=", "null", ";", "if", "(", "is_object", "(", "$", "entityOrClass", ")", ")", "{", "$", "context", "=", "DeserializationContext", ":...
Deserialize data into Doctrine entity. @param string|mixed $item Either a valid Entity class name, or a Doctrine Entity object @return mixed
[ "Deserialize", "data", "into", "Doctrine", "entity", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/AbstractRestController.php#L136-L147
192,051
backbee/backbee-php
Rest/Controller/AbstractRestController.php
AbstractRestController.createResponse
protected function createResponse($content = '', $statusCode = 200, $contentType = 'application/json') { if ('' === $content && 'application/json' === $contentType) { $content = '{}'; } $response = new Response($content, $statusCode); $response->headers->set('Content-Typ...
php
protected function createResponse($content = '', $statusCode = 200, $contentType = 'application/json') { if ('' === $content && 'application/json' === $contentType) { $content = '{}'; } $response = new Response($content, $statusCode); $response->headers->set('Content-Typ...
[ "protected", "function", "createResponse", "(", "$", "content", "=", "''", ",", "$", "statusCode", "=", "200", ",", "$", "contentType", "=", "'application/json'", ")", "{", "if", "(", "''", "===", "$", "content", "&&", "'application/json'", "===", "$", "co...
Create a RESTful response. @return \Symfony\Component\HttpFoundation\Response
[ "Create", "a", "RESTful", "response", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/AbstractRestController.php#L170-L180
192,052
backbee/backbee-php
Rest/Controller/AbstractRestController.php
AbstractRestController.sortByUids
protected function sortByUids($uids, $contents) { $uids = (array) $uids; $orderedUids = []; foreach ($uids as $key => $uid) { $orderedUids[$uid] = $key; } $formattedResult = []; foreach ($contents as $content) { if (isset($orderedUids[$conten...
php
protected function sortByUids($uids, $contents) { $uids = (array) $uids; $orderedUids = []; foreach ($uids as $key => $uid) { $orderedUids[$uid] = $key; } $formattedResult = []; foreach ($contents as $content) { if (isset($orderedUids[$conten...
[ "protected", "function", "sortByUids", "(", "$", "uids", ",", "$", "contents", ")", "{", "$", "uids", "=", "(", "array", ")", "$", "uids", ";", "$", "orderedUids", "=", "[", "]", ";", "foreach", "(", "$", "uids", "as", "$", "key", "=>", "$", "uid...
Keep the order of contents by the list of uids @param array $uids @param Paginator $contents @return null|Paginator
[ "Keep", "the", "order", "of", "contents", "by", "the", "list", "of", "uids" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Rest/Controller/AbstractRestController.php#L262-L281
192,053
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.addHelperDir
public function addHelperDir($dir) { if (true === file_exists($dir) && true === is_dir($dir)) { $this->getApplication()->getAutoloader()->registerNamespace('BackBee\Renderer\Helper', $dir); } return $this; }
php
public function addHelperDir($dir) { if (true === file_exists($dir) && true === is_dir($dir)) { $this->getApplication()->getAutoloader()->registerNamespace('BackBee\Renderer\Helper', $dir); } return $this; }
[ "public", "function", "addHelperDir", "(", "$", "dir", ")", "{", "if", "(", "true", "===", "file_exists", "(", "$", "dir", ")", "&&", "true", "===", "is_dir", "(", "$", "dir", ")", ")", "{", "$", "this", "->", "getApplication", "(", ")", "->", "get...
Add new helper directory in the choosen position. @codeCoverageIgnore @param string $new_dir location of the new directory @param integer $position position in the array
[ "Add", "new", "helper", "directory", "in", "the", "choosen", "position", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L300-L307
192,054
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.addLayoutDir
public function addLayoutDir($new_dir, $position = 0) { if (true === file_exists($new_dir) && true === is_dir($new_dir)) { $this->insertInArrayOnPostion($this->_layoutdir, $new_dir, $position); } return $this; }
php
public function addLayoutDir($new_dir, $position = 0) { if (true === file_exists($new_dir) && true === is_dir($new_dir)) { $this->insertInArrayOnPostion($this->_layoutdir, $new_dir, $position); } return $this; }
[ "public", "function", "addLayoutDir", "(", "$", "new_dir", ",", "$", "position", "=", "0", ")", "{", "if", "(", "true", "===", "file_exists", "(", "$", "new_dir", ")", "&&", "true", "===", "is_dir", "(", "$", "new_dir", ")", ")", "{", "$", "this", ...
Add new layout directory in the choosen position. @codeCoverageIgnore @param string $new_dir location of the new directory @param integer $position position in the array
[ "Add", "new", "layout", "directory", "in", "the", "choosen", "position", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L317-L324
192,055
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.addScriptDir
public function addScriptDir($new_dir, $position = 1) { if (true === file_exists($new_dir) && true === is_dir($new_dir)) { $this->insertInArrayOnPostion($this->_scriptdir, $new_dir, $position); } return $this; }
php
public function addScriptDir($new_dir, $position = 1) { if (true === file_exists($new_dir) && true === is_dir($new_dir)) { $this->insertInArrayOnPostion($this->_scriptdir, $new_dir, $position); } return $this; }
[ "public", "function", "addScriptDir", "(", "$", "new_dir", ",", "$", "position", "=", "1", ")", "{", "if", "(", "true", "===", "file_exists", "(", "$", "new_dir", ")", "&&", "true", "===", "is_dir", "(", "$", "new_dir", ")", ")", "{", "$", "this", ...
Add new script directory in the choosen position. @codeCoverageIgnore @param strimg $new_dir location of the new directory @param integer $position position in the array
[ "Add", "new", "script", "directory", "in", "the", "choosen", "position", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L334-L341
192,056
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.assign
public function assign($var, $value = null) { if (is_string($var)) { $this->_vars[$var] = $value; return $this; } if (is_array($var)) { foreach ($var as $key => $value) { if ($value instanceof AbstractClassContent) { /...
php
public function assign($var, $value = null) { if (is_string($var)) { $this->_vars[$var] = $value; return $this; } if (is_array($var)) { foreach ($var as $key => $value) { if ($value instanceof AbstractClassContent) { /...
[ "public", "function", "assign", "(", "$", "var", ",", "$", "value", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "var", ")", ")", "{", "$", "this", "->", "_vars", "[", "$", "var", "]", "=", "$", "value", ";", "return", "$", "this", ...
Assign one or more variables. @param mixed $var A variable name or an array of variables to set @param mixed $value The variable value to set @return AbstractRenderer The current renderer
[ "Assign", "one", "or", "more", "variables", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L429-L455
192,057
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.getCurrentRoot
public function getCurrentRoot() { if (null !== $this->getCurrentPage()) { return $this->getCurrentPage()->getRoot(); } elseif (null === $this->getCurrentSite()) { return; } else { return $this->application->getEntityManager() ->getReposito...
php
public function getCurrentRoot() { if (null !== $this->getCurrentPage()) { return $this->getCurrentPage()->getRoot(); } elseif (null === $this->getCurrentSite()) { return; } else { return $this->application->getEntityManager() ->getReposito...
[ "public", "function", "getCurrentRoot", "(", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "getCurrentPage", "(", ")", ")", "{", "return", "$", "this", "->", "getCurrentPage", "(", ")", "->", "getRoot", "(", ")", ";", "}", "elseif", "(", "nu...
Return the current root of the page to be rendered. @return null|BackBee\NestedNode\Page
[ "Return", "the", "current", "root", "of", "the", "page", "to", "be", "rendered", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L616-L628
192,058
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.setMode
public function setMode($mode = null, $ignoreIfRenderModeNotAvailable = true) { $this->_mode = (null === $mode || '' === $mode ? null : $mode); $this->_ignoreIfRenderModeNotAvailable = $ignoreIfRenderModeNotAvailable; return $this; }
php
public function setMode($mode = null, $ignoreIfRenderModeNotAvailable = true) { $this->_mode = (null === $mode || '' === $mode ? null : $mode); $this->_ignoreIfRenderModeNotAvailable = $ignoreIfRenderModeNotAvailable; return $this; }
[ "public", "function", "setMode", "(", "$", "mode", "=", "null", ",", "$", "ignoreIfRenderModeNotAvailable", "=", "true", ")", "{", "$", "this", "->", "_mode", "=", "(", "null", "===", "$", "mode", "||", "''", "===", "$", "mode", "?", "null", ":", "$"...
Set the rendering mode. @codeCoverageIgnore @param string $mode @param Boolean $ignoreIfRenderModeNotAvailable Ignore the rendering if specified render mode is not available if TRUE, use the default template otherwise @return AbstractRenderer The current renderer
[ "Set", "the", "rendering", "mode", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L715-L721
192,059
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.setObject
public function setObject(RenderableInterface $object = null) { $this->__currentelement = null; $this->_object = $object; if (is_array($this->__vars) && 0 < count($this->__vars)) { foreach ($this->__vars as $key => $var) { if ($var === $object) { ...
php
public function setObject(RenderableInterface $object = null) { $this->__currentelement = null; $this->_object = $object; if (is_array($this->__vars) && 0 < count($this->__vars)) { foreach ($this->__vars as $key => $var) { if ($var === $object) { ...
[ "public", "function", "setObject", "(", "RenderableInterface", "$", "object", "=", "null", ")", "{", "$", "this", "->", "__currentelement", "=", "null", ";", "$", "this", "->", "_object", "=", "$", "object", ";", "if", "(", "is_array", "(", "$", "this", ...
Set the object to render. @param RenderableInterface $object @return AbstractRenderer The current renderer
[ "Set", "the", "object", "to", "render", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L742-L756
192,060
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.setParam
public function setParam($param, $value = null) { if (is_string($param)) { $this->_params[$param] = $value; return $this; } if (is_array($param)) { foreach ($param as $key => $value) { $this->_params[$key] = $value; } ...
php
public function setParam($param, $value = null) { if (is_string($param)) { $this->_params[$param] = $value; return $this; } if (is_array($param)) { foreach ($param as $key => $value) { $this->_params[$key] = $value; } ...
[ "public", "function", "setParam", "(", "$", "param", ",", "$", "value", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "param", ")", ")", "{", "$", "this", "->", "_params", "[", "$", "param", "]", "=", "$", "value", ";", "return", "$", ...
Set one or set of parameters. @param mixed $param A parameter name or an array of parameters to set @param mixed $value The parameter value to set @return AbstractRenderer The current renderer
[ "Set", "one", "or", "set", "of", "parameters", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L780-L795
192,061
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.updateLayout
public function updateLayout(Layout $layout) { if (null === $layout->getSite()) { return false; } $layoutfile = $this->getLayoutFile($layout); File::resolveFilepath($layoutfile, null, array('include_path' => $this->_layoutdir)); if (false === file_exists($layout...
php
public function updateLayout(Layout $layout) { if (null === $layout->getSite()) { return false; } $layoutfile = $this->getLayoutFile($layout); File::resolveFilepath($layoutfile, null, array('include_path' => $this->_layoutdir)); if (false === file_exists($layout...
[ "public", "function", "updateLayout", "(", "Layout", "$", "layout", ")", "{", "if", "(", "null", "===", "$", "layout", "->", "getSite", "(", ")", ")", "{", "return", "false", ";", "}", "$", "layoutfile", "=", "$", "this", "->", "getLayoutFile", "(", ...
Updates a file script of a layout. @param Layout $layout The layout to update @return string The filename of the updated script
[ "Updates", "a", "file", "script", "of", "a", "layout", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L826-L848
192,062
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.removeLayout
public function removeLayout(Layout $layout) { if (null === $layout->getSite()) { return false; } $layoutfile = $this->getLayoutFile($layout); @unlink($layoutfile); }
php
public function removeLayout(Layout $layout) { if (null === $layout->getSite()) { return false; } $layoutfile = $this->getLayoutFile($layout); @unlink($layoutfile); }
[ "public", "function", "removeLayout", "(", "Layout", "$", "layout", ")", "{", "if", "(", "null", "===", "$", "layout", "->", "getSite", "(", ")", ")", "{", "return", "false", ";", "}", "$", "layoutfile", "=", "$", "this", "->", "getLayoutFile", "(", ...
Unlink a file script of a layout. @param Layout $layout The layout to update
[ "Unlink", "a", "file", "script", "of", "a", "layout", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L855-L863
192,063
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.getHelper
public function getHelper($method) { $helper = null; if (true === $this->helpers->has($method)) { $helper = $this->helpers->get($method); } return $helper; }
php
public function getHelper($method) { $helper = null; if (true === $this->helpers->has($method)) { $helper = $this->helpers->get($method); } return $helper; }
[ "public", "function", "getHelper", "(", "$", "method", ")", "{", "$", "helper", "=", "null", ";", "if", "(", "true", "===", "$", "this", "->", "helpers", "->", "has", "(", "$", "method", ")", ")", "{", "$", "helper", "=", "$", "this", "->", "help...
Returns helper if it exists or null. @param [type] $method @return AHelper|null
[ "Returns", "helper", "if", "it", "exists", "or", "null", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L872-L880
192,064
backbee/backbee-php
Renderer/AbstractRenderer.php
AbstractRenderer.createHelper
public function createHelper($method, $argv) { $helper = null; $helperClass = 'BackBee\Renderer\Helper\\'.$method; if (true === class_exists($helperClass)) { $this->helpers->set($method, new $helperClass($this, $argv)); $helper = $this->helpers->get($method); ...
php
public function createHelper($method, $argv) { $helper = null; $helperClass = 'BackBee\Renderer\Helper\\'.$method; if (true === class_exists($helperClass)) { $this->helpers->set($method, new $helperClass($this, $argv)); $helper = $this->helpers->get($method); ...
[ "public", "function", "createHelper", "(", "$", "method", ",", "$", "argv", ")", "{", "$", "helper", "=", "null", ";", "$", "helperClass", "=", "'BackBee\\Renderer\\Helper\\\\'", ".", "$", "method", ";", "if", "(", "true", "===", "class_exists", "(", "$", ...
Create a new helper if class exists. @param string $method @param array $argv @return AHelper|null
[ "Create", "a", "new", "helper", "if", "class", "exists", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Renderer/AbstractRenderer.php#L890-L900
192,065
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.hasJoinCriteria
public static function hasJoinCriteria(array $criteria = null) { if (null === $criteria) { return false; } return (0 < count(array_intersect(self::$joinCriteria, array_keys($criteria)))); }
php
public static function hasJoinCriteria(array $criteria = null) { if (null === $criteria) { return false; } return (0 < count(array_intersect(self::$joinCriteria, array_keys($criteria)))); }
[ "public", "static", "function", "hasJoinCriteria", "(", "array", "$", "criteria", "=", "null", ")", "{", "if", "(", "null", "===", "$", "criteria", ")", "{", "return", "false", ";", "}", "return", "(", "0", "<", "count", "(", "array_intersect", "(", "s...
Are some criteria joined fields of section? @param array|null $criteria Optional, the criteria to test @return boolean True if some criteria are joined fields of section, false elsewhere
[ "Are", "some", "criteria", "joined", "fields", "of", "section?" ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L84-L91
192,066
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.andSiteIs
public function andSiteIs(Site $site) { $suffix = $this->getSuffix(); return $this->andWhere($this->getSectionAlias().'._site = :site'.$suffix) ->setParameter('site'.$suffix, $site); }
php
public function andSiteIs(Site $site) { $suffix = $this->getSuffix(); return $this->andWhere($this->getSectionAlias().'._site = :site'.$suffix) ->setParameter('site'.$suffix, $site); }
[ "public", "function", "andSiteIs", "(", "Site", "$", "site", ")", "{", "$", "suffix", "=", "$", "this", "->", "getSuffix", "(", ")", ";", "return", "$", "this", "->", "andWhere", "(", "$", "this", "->", "getSectionAlias", "(", ")", ".", "'._site = :sit...
Add query part to select page by site. @param Site $site The owning site @return PageQueryBuilder
[ "Add", "query", "part", "to", "select", "page", "by", "site", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L100-L106
192,067
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.andIsOnline
public function andIsOnline() { return $this->andWhere($this->getAlias().'._state IN ('.$this->expr()->literal(Page::STATE_ONLINE).','.$this->expr()->literal(Page::STATE_ONLINE + Page::STATE_HIDDEN).')') ->andWhere($this->getAlias().'._publishing IS NULL OR '.$this->getAlias().'._pub...
php
public function andIsOnline() { return $this->andWhere($this->getAlias().'._state IN ('.$this->expr()->literal(Page::STATE_ONLINE).','.$this->expr()->literal(Page::STATE_ONLINE + Page::STATE_HIDDEN).')') ->andWhere($this->getAlias().'._publishing IS NULL OR '.$this->getAlias().'._pub...
[ "public", "function", "andIsOnline", "(", ")", "{", "return", "$", "this", "->", "andWhere", "(", "$", "this", "->", "getAlias", "(", ")", ".", "'._state IN ('", ".", "$", "this", "->", "expr", "(", ")", "->", "literal", "(", "Page", "::", "STATE_ONLIN...
Add query part to select online pages. @return PageQueryBuilder
[ "Add", "query", "part", "to", "select", "online", "pages", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L133-L138
192,068
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.andIsNotDeleted
public function andIsNotDeleted() { return $this->andWhere($this->getAlias().'._state < '.$this->expr()->literal(Page::STATE_DELETED)); }
php
public function andIsNotDeleted() { return $this->andWhere($this->getAlias().'._state < '.$this->expr()->literal(Page::STATE_DELETED)); }
[ "public", "function", "andIsNotDeleted", "(", ")", "{", "return", "$", "this", "->", "andWhere", "(", "$", "this", "->", "getAlias", "(", ")", ".", "'._state < '", ".", "$", "this", "->", "expr", "(", ")", "->", "literal", "(", "Page", "::", "STATE_DEL...
Add query part to select not deleted pages. @return PageQueryBuilder
[ "Add", "query", "part", "to", "select", "not", "deleted", "pages", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L156-L159
192,069
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.andRootIs
public function andRootIs(Page $root) { if (!$root->isRoot()) { throw new \InvalidArgumentException('Provided page is not a tree root.'); } $suffix = $this->getSuffix(); return $this->andWhere($this->getSectionAlias().'._root = :root'.$suffix) ->s...
php
public function andRootIs(Page $root) { if (!$root->isRoot()) { throw new \InvalidArgumentException('Provided page is not a tree root.'); } $suffix = $this->getSuffix(); return $this->andWhere($this->getSectionAlias().'._root = :root'.$suffix) ->s...
[ "public", "function", "andRootIs", "(", "Page", "$", "root", ")", "{", "if", "(", "!", "$", "root", "->", "isRoot", "(", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Provided page is not a tree root.'", ")", ";", "}", "$", "suffi...
Add query part to select pages from their tree root. @param Page $root The root page to check @return PageQueryBuilder @throws \InvalidArgumentException Raises if $root is not a tree root
[ "Add", "query", "part", "to", "select", "pages", "from", "their", "tree", "root", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L210-L219
192,070
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.andIsSiblingsOf
public function andIsSiblingsOf(Page $page, $strict = false, array $order = null, $limit = null, $start = 0) { if (null === $page->getParent()) { $this->andParentIs(null); } else { $this->andIsDescendantOf($page->getParent(), false, $page->getLevel()); } if (...
php
public function andIsSiblingsOf(Page $page, $strict = false, array $order = null, $limit = null, $start = 0) { if (null === $page->getParent()) { $this->andParentIs(null); } else { $this->andIsDescendantOf($page->getParent(), false, $page->getLevel()); } if (...
[ "public", "function", "andIsSiblingsOf", "(", "Page", "$", "page", ",", "$", "strict", "=", "false", ",", "array", "$", "order", "=", "null", ",", "$", "limit", "=", "null", ",", "$", "start", "=", "0", ")", "{", "if", "(", "null", "===", "$", "p...
Add query part to select siblings of page. @param Page $page The page to look for siblings @param boolean $strict Optional, if false (by default) $node is include to the selection @param array|null $order Optional, ordering spec ( [$field...
[ "Add", "query", "part", "to", "select", "siblings", "of", "page", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L263-L287
192,071
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.andStateIsIn
public function andStateIsIn($states) { $suffix = $this->getSuffix(); return $this->andWhere($this->getAlias().'._state IN (:states'.$suffix.')') ->setParameter('states'.$suffix, (array) $states); }
php
public function andStateIsIn($states) { $suffix = $this->getSuffix(); return $this->andWhere($this->getAlias().'._state IN (:states'.$suffix.')') ->setParameter('states'.$suffix, (array) $states); }
[ "public", "function", "andStateIsIn", "(", "$", "states", ")", "{", "$", "suffix", "=", "$", "this", "->", "getSuffix", "(", ")", ";", "return", "$", "this", "->", "andWhere", "(", "$", "this", "->", "getAlias", "(", ")", ".", "'._state IN (:states'", ...
Add query part to select page having specific states. @param integer|integer[] $states One or several states to test. @return PageQueryBuilder
[ "Add", "query", "part", "to", "select", "page", "having", "specific", "states", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L342-L347
192,072
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.andStateIsNotIn
public function andStateIsNotIn($states) { if (false === is_array($states)) { $states = array($states); } $suffix = $this->getSuffix(); return $this->andWhere($this->getAlias().'._state NOT IN (:states'.$suffix.')') ->setParameter('states'.$suffi...
php
public function andStateIsNotIn($states) { if (false === is_array($states)) { $states = array($states); } $suffix = $this->getSuffix(); return $this->andWhere($this->getAlias().'._state NOT IN (:states'.$suffix.')') ->setParameter('states'.$suffi...
[ "public", "function", "andStateIsNotIn", "(", "$", "states", ")", "{", "if", "(", "false", "===", "is_array", "(", "$", "states", ")", ")", "{", "$", "states", "=", "array", "(", "$", "states", ")", ";", "}", "$", "suffix", "=", "$", "this", "->", ...
Add query part to select page having not specific states. @param integer|integer[] $states One or several states to test. @return PageQueryBuilder
[ "Add", "query", "part", "to", "select", "page", "having", "not", "specific", "states", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L356-L366
192,073
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.andSearchCriteria
public function andSearchCriteria($restrictedStates = array(), $options = array()) { if (true === is_array($restrictedStates) && 0 < count($restrictedStates) && false === in_array('all', $restrictedStates)) { $this->andStateIsIn($restrictedStates); } if (false === is_array($opti...
php
public function andSearchCriteria($restrictedStates = array(), $options = array()) { if (true === is_array($restrictedStates) && 0 < count($restrictedStates) && false === in_array('all', $restrictedStates)) { $this->andStateIsIn($restrictedStates); } if (false === is_array($opti...
[ "public", "function", "andSearchCriteria", "(", "$", "restrictedStates", "=", "array", "(", ")", ",", "$", "options", "=", "array", "(", ")", ")", "{", "if", "(", "true", "===", "is_array", "(", "$", "restrictedStates", ")", "&&", "0", "<", "count", "(...
Add query part to select page matching provided criteria. @param integer|integer[] $restrictedStates Optional, limit to pages having provided states, empty by default. @param string[] $options Optional, the search criteria: * 'beforePubdateField' => timestamp against page._modified, * 'a...
[ "Add", "query", "part", "to", "select", "page", "matching", "provided", "criteria", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L379-L408
192,074
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.addSearchCriteria
public function addSearchCriteria(array $criteria) { $suffix = $this->getSuffix(); foreach ($criteria as $crit => $value) { if (false === strpos($crit, '.')) { $crit = (true === in_array($crit, self::$joinCriteria) ? $this->getSectionAlias() : $this->getAlias()).'.'.$crit...
php
public function addSearchCriteria(array $criteria) { $suffix = $this->getSuffix(); foreach ($criteria as $crit => $value) { if (false === strpos($crit, '.')) { $crit = (true === in_array($crit, self::$joinCriteria) ? $this->getSectionAlias() : $this->getAlias()).'.'.$crit...
[ "public", "function", "addSearchCriteria", "(", "array", "$", "criteria", ")", "{", "$", "suffix", "=", "$", "this", "->", "getSuffix", "(", ")", ";", "foreach", "(", "$", "criteria", "as", "$", "crit", "=>", "$", "value", ")", "{", "if", "(", "false...
Add query part to math provided criteria. @param array $criteria Array of criteria to look for( ['field' => 'value'] ) @return PageQueryBuilder
[ "Add", "query", "part", "to", "math", "provided", "criteria", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L417-L431
192,075
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.addMultipleOrderBy
public function addMultipleOrderBy(array $criteria = array('_position' => 'ASC')) { if (true === empty($criteria)) { $criteria = array('_position' => 'ASC'); } foreach ($criteria as $sort => $order) { $this->addOrderBy($sort, $order); } return $this;...
php
public function addMultipleOrderBy(array $criteria = array('_position' => 'ASC')) { if (true === empty($criteria)) { $criteria = array('_position' => 'ASC'); } foreach ($criteria as $sort => $order) { $this->addOrderBy($sort, $order); } return $this;...
[ "public", "function", "addMultipleOrderBy", "(", "array", "$", "criteria", "=", "array", "(", "'_position'", "=>", "'ASC'", ")", ")", "{", "if", "(", "true", "===", "empty", "(", "$", "criteria", ")", ")", "{", "$", "criteria", "=", "array", "(", "'_po...
Add several ordering criteria by array. @param array $criteria Optional, the ordering criteria ( ['_leftnode' => 'asc'] by default ) @return PageQueryBuilder
[ "Add", "several", "ordering", "criteria", "by", "array", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L463-L474
192,076
backbee/backbee-php
NestedNode/Repository/PageQueryBuilder.php
PageQueryBuilder.getSectionAlias
public function getSectionAlias() { if (null === $this->sectionAlias) { $this->sectionAlias = $this->getAlias().'_s'; $this->join($this->getAlias().'._section', $this->sectionAlias); } return $this->sectionAlias; }
php
public function getSectionAlias() { if (null === $this->sectionAlias) { $this->sectionAlias = $this->getAlias().'_s'; $this->join($this->getAlias().'._section', $this->sectionAlias); } return $this->sectionAlias; }
[ "public", "function", "getSectionAlias", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "sectionAlias", ")", "{", "$", "this", "->", "sectionAlias", "=", "$", "this", "->", "getAlias", "(", ")", ".", "'_s'", ";", "$", "this", "->", "join...
Returns the join alias to section. @return string
[ "Returns", "the", "join", "alias", "to", "section", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/PageQueryBuilder.php#L524-L532
192,077
backbee/backbee-php
Util/Parameter.php
Parameter.paramsReplaceRecursive
public static function paramsReplaceRecursive(array $array1, $array2, $mutableField = false) { if (!is_array($array2)) { return $array1; } foreach ($array1 as $key => $value) { $mutableFields = (is_array($value) && array_key_exists("_mutablefields", $value)) ? (array...
php
public static function paramsReplaceRecursive(array $array1, $array2, $mutableField = false) { if (!is_array($array2)) { return $array1; } foreach ($array1 as $key => $value) { $mutableFields = (is_array($value) && array_key_exists("_mutablefields", $value)) ? (array...
[ "public", "static", "function", "paramsReplaceRecursive", "(", "array", "$", "array1", ",", "$", "array2", ",", "$", "mutableField", "=", "false", ")", "{", "if", "(", "!", "is_array", "(", "$", "array2", ")", ")", "{", "return", "$", "array1", ";", "}...
replaces the values of the first array with the same values from all the following arrays. If a key from the first array exists in the second array, its value will be replaced by the value from the second array. If the key exists in the second array, and not the first, it will be deleted. Mutable specify the value of t...
[ "replaces", "the", "values", "of", "the", "first", "array", "with", "the", "same", "values", "from", "all", "the", "following", "arrays", ".", "If", "a", "key", "from", "the", "first", "array", "exists", "in", "the", "second", "array", "its", "value", "w...
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Util/Parameter.php#L48-L77
192,078
czim/monolog-json-context
src/Formatters/AbstractContextFormatter.php
AbstractContextFormatter.buildTopLevelArrayNestedForContext
protected function buildTopLevelArrayNestedForContext(array $context) { // Context becomes the main level, so anything in context (with some caveats) // is moved up to the top level -- by making %context% the main 'message' // output in the log line. // Rename to prefix context vari...
php
protected function buildTopLevelArrayNestedForContext(array $context) { // Context becomes the main level, so anything in context (with some caveats) // is moved up to the top level -- by making %context% the main 'message' // output in the log line. // Rename to prefix context vari...
[ "protected", "function", "buildTopLevelArrayNestedForContext", "(", "array", "$", "context", ")", "{", "// Context becomes the main level, so anything in context (with some caveats)", "// is moved up to the top level -- by making %context% the main 'message'", "// output in the log line.", "...
Builds an array that can be used as a basis for top level JSON encoding. This nests reserved values under the 'context' key, where required. @param array $context @return array
[ "Builds", "an", "array", "that", "can", "be", "used", "as", "a", "basis", "for", "top", "level", "JSON", "encoding", "." ]
6bb36320aacfbcc30114b44cccb72e24654bd44d
https://github.com/czim/monolog-json-context/blob/6bb36320aacfbcc30114b44cccb72e24654bd44d/src/Formatters/AbstractContextFormatter.php#L84-L119
192,079
czim/monolog-json-context
src/Formatters/AbstractContextFormatter.php
AbstractContextFormatter.setSpecialProperties
protected function setSpecialProperties(array &$context) { if ($this->application) { $context['application'] = $this->application; } if ( ! array_key_exists('category', $context) && $this->defaultCategory) { $context['category'] = $this->defaultCategory; } ...
php
protected function setSpecialProperties(array &$context) { if ($this->application) { $context['application'] = $this->application; } if ( ! array_key_exists('category', $context) && $this->defaultCategory) { $context['category'] = $this->defaultCategory; } ...
[ "protected", "function", "setSpecialProperties", "(", "array", "&", "$", "context", ")", "{", "if", "(", "$", "this", "->", "application", ")", "{", "$", "context", "[", "'application'", "]", "=", "$", "this", "->", "application", ";", "}", "if", "(", ...
Updates the array with special properties if required. @param array $context by reference
[ "Updates", "the", "array", "with", "special", "properties", "if", "required", "." ]
6bb36320aacfbcc30114b44cccb72e24654bd44d
https://github.com/czim/monolog-json-context/blob/6bb36320aacfbcc30114b44cccb72e24654bd44d/src/Formatters/AbstractContextFormatter.php#L126-L135
192,080
backbee/backbee-php
Installer/EntityFinder.php
EntityFinder.getExcludePaths
public function getExcludePaths($path) { $excludePaths = []; $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)); $objects = new \RegexIterator($iterator, '/.*(.php)$/', \RecursiveRegexIterator::GET_MATCH); foreach ($objects as $filename => $object) {...
php
public function getExcludePaths($path) { $excludePaths = []; $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)); $objects = new \RegexIterator($iterator, '/.*(.php)$/', \RecursiveRegexIterator::GET_MATCH); foreach ($objects as $filename => $object) {...
[ "public", "function", "getExcludePaths", "(", "$", "path", ")", "{", "$", "excludePaths", "=", "[", "]", ";", "$", "iterator", "=", "new", "\\", "RecursiveIteratorIterator", "(", "new", "\\", "RecursiveDirectoryIterator", "(", "$", "path", ")", ")", ";", "...
Get the paths that should be excluded. @param string $path @return array
[ "Get", "the", "paths", "that", "should", "be", "excluded", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Installer/EntityFinder.php#L89-L105
192,081
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository.insertNodeAsFirstChildOf
public function insertNodeAsFirstChildOf(AbstractNestedNode $node, AbstractNestedNode $parent) { return $this->_insertNode($node, $parent, $parent->getLeftnode() + 1); }
php
public function insertNodeAsFirstChildOf(AbstractNestedNode $node, AbstractNestedNode $parent) { return $this->_insertNode($node, $parent, $parent->getLeftnode() + 1); }
[ "public", "function", "insertNodeAsFirstChildOf", "(", "AbstractNestedNode", "$", "node", ",", "AbstractNestedNode", "$", "parent", ")", "{", "return", "$", "this", "->", "_insertNode", "(", "$", "node", ",", "$", "parent", ",", "$", "parent", "->", "getLeftno...
Inserts a leaf node in a tree as first child of the provided parent node. @param \BackBee\NestedNode\AbstractNestedNode $node The node to be inserted @param \BackBee\NestedNode\AbstractNestedNode $parent The parent node @return \BackBee\NestedNode\AbstractNestedNode The in...
[ "Inserts", "a", "leaf", "node", "in", "a", "tree", "as", "first", "child", "of", "the", "provided", "parent", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L152-L155
192,082
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository.insertNodeAsLastChildOf
public function insertNodeAsLastChildOf(AbstractNestedNode $node, AbstractNestedNode $parent) { return $this->_insertNode($node, $parent, $parent->getRightnode()); }
php
public function insertNodeAsLastChildOf(AbstractNestedNode $node, AbstractNestedNode $parent) { return $this->_insertNode($node, $parent, $parent->getRightnode()); }
[ "public", "function", "insertNodeAsLastChildOf", "(", "AbstractNestedNode", "$", "node", ",", "AbstractNestedNode", "$", "parent", ")", "{", "return", "$", "this", "->", "_insertNode", "(", "$", "node", ",", "$", "parent", ",", "$", "parent", "->", "getRightno...
Inserts a leaf node in a tree as last child of the provided parent node. @param \BackBee\NestedNode\AbstractNestedNode $node The node to be inserted @param \BackBee\NestedNode\AbstractNestedNode $parent The parent node @return \BackBee\NestedNode\AbstractNestedNode The inserted ...
[ "Inserts", "a", "leaf", "node", "in", "a", "tree", "as", "last", "child", "of", "the", "provided", "parent", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L165-L168
192,083
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository._insertNode
protected function _insertNode(AbstractNestedNode $node, AbstractNestedNode $parent, $newLeftNode) { if ($parent->isDescendantOf($node, false)) { throw new InvalidArgumentException('Cannot insert node in itself or one of its descendants'); } if (false === $this->_em->contains($p...
php
protected function _insertNode(AbstractNestedNode $node, AbstractNestedNode $parent, $newLeftNode) { if ($parent->isDescendantOf($node, false)) { throw new InvalidArgumentException('Cannot insert node in itself or one of its descendants'); } if (false === $this->_em->contains($p...
[ "protected", "function", "_insertNode", "(", "AbstractNestedNode", "$", "node", ",", "AbstractNestedNode", "$", "parent", ",", "$", "newLeftNode", ")", "{", "if", "(", "$", "parent", "->", "isDescendantOf", "(", "$", "node", ",", "false", ")", ")", "{", "t...
Inserts a leaf node in a tree. @param \BackBee\NestedNode\AbstractNestedNode $node The node to be inserted @param \BackBee\NestedNode\AbstractNestedNode $parent The parent node @param int $newLeftNode The new left node of the inse...
[ "Inserts", "a", "leaf", "node", "in", "a", "tree", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L180-L205
192,084
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository.getSiblings
public function getSiblings(AbstractNestedNode $node, $includeNode = false, $order = null, $limit = null, $start = 0) { return $this->createQueryBuilder('n') ->andIsSiblingsOf($node, !$includeNode, $order, $limit, $start) ->getQuery() -...
php
public function getSiblings(AbstractNestedNode $node, $includeNode = false, $order = null, $limit = null, $start = 0) { return $this->createQueryBuilder('n') ->andIsSiblingsOf($node, !$includeNode, $order, $limit, $start) ->getQuery() -...
[ "public", "function", "getSiblings", "(", "AbstractNestedNode", "$", "node", ",", "$", "includeNode", "=", "false", ",", "$", "order", "=", "null", ",", "$", "limit", "=", "null", ",", "$", "start", "=", "0", ")", "{", "return", "$", "this", "->", "c...
Returns the siblings of the provided node. @param \BackBee\NestedNode\AbstractNestedNode $node @param boolean $includeNode if TRUE, include $node in result array @param array $order ordering spec @param int $limit max...
[ "Returns", "the", "siblings", "of", "the", "provided", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L245-L251
192,085
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository.getAncestors
public function getAncestors(AbstractNestedNode $node, $depth = null, $includeNode = false) { $q = $this->createQueryBuilder('n') ->andIsAncestorOf($node, !$includeNode); if (null !== $depth) { $q->andLevelIsUpperThan($node->getLevel() - $depth); } retur...
php
public function getAncestors(AbstractNestedNode $node, $depth = null, $includeNode = false) { $q = $this->createQueryBuilder('n') ->andIsAncestorOf($node, !$includeNode); if (null !== $depth) { $q->andLevelIsUpperThan($node->getLevel() - $depth); } retur...
[ "public", "function", "getAncestors", "(", "AbstractNestedNode", "$", "node", ",", "$", "depth", "=", "null", ",", "$", "includeNode", "=", "false", ")", "{", "$", "q", "=", "$", "this", "->", "createQueryBuilder", "(", "'n'", ")", "->", "andIsAncestorOf",...
Returns the ancestors of the provided node. @param \BackBee\NestedNode\AbstractNestedNode $node @param int $depth Returns only ancestors from $depth number of generation @param boolean $includeNode Returns also the node itsef if TRUE @return array
[ "Returns", "the", "ancestors", "of", "the", "provided", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L320-L332
192,086
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository.getDescendants
public function getDescendants(AbstractNestedNode $node, $depth = null, $includeNode = false) { $q = $this->createQueryBuilder('n') ->andIsDescendantOf($node, !$includeNode); if (null !== $depth) { $q->andLevelIsLowerThan($node->getLevel() + $depth); } r...
php
public function getDescendants(AbstractNestedNode $node, $depth = null, $includeNode = false) { $q = $this->createQueryBuilder('n') ->andIsDescendantOf($node, !$includeNode); if (null !== $depth) { $q->andLevelIsLowerThan($node->getLevel() + $depth); } r...
[ "public", "function", "getDescendants", "(", "AbstractNestedNode", "$", "node", ",", "$", "depth", "=", "null", ",", "$", "includeNode", "=", "false", ")", "{", "$", "q", "=", "$", "this", "->", "createQueryBuilder", "(", "'n'", ")", "->", "andIsDescendant...
Returns the descendants of the provided node. @param \BackBee\NestedNode\AbstractNestedNode $node @param int $depth Returns only decendants from $depth number of generation @param boolean $includeNode Returns also the node itsef if TRUE @return array
[ "Returns", "the", "descendants", "of", "the", "provided", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L342-L354
192,087
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository.shiftRlValues
private function shiftRlValues(AbstractNestedNode $node, $first, $delta) { $this->createQueryBuilder('n') ->set('n._leftnode', 'n._leftnode + :delta') ->andRootIs($node->getRoot()) ->andLeftnodeIsUpperThan($first) ->setParameter('delta', $delta) ->...
php
private function shiftRlValues(AbstractNestedNode $node, $first, $delta) { $this->createQueryBuilder('n') ->set('n._leftnode', 'n._leftnode + :delta') ->andRootIs($node->getRoot()) ->andLeftnodeIsUpperThan($first) ->setParameter('delta', $delta) ->...
[ "private", "function", "shiftRlValues", "(", "AbstractNestedNode", "$", "node", ",", "$", "first", ",", "$", "delta", ")", "{", "$", "this", "->", "createQueryBuilder", "(", "'n'", ")", "->", "set", "(", "'n._leftnode'", ",", "'n._leftnode + :delta'", ")", "...
Shift part of a tree. @param \BackBee\NestedNode\AbstractNestedNode $node @param integer $first @param integer $delta @param \BackBee\NestedNode\AbstractNestedNode $target @...
[ "Shift", "part", "of", "a", "tree", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L585-L608
192,088
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository.detachFromTree
protected function detachFromTree(AbstractNestedNode $node) { if (true === $node->isRoot()) { return $this; } $this->refreshExistingNode($node) ->createQueryBuilder('n') ->set('n._leftnode', 'n._leftnode - :delta_node') ->set('n._r...
php
protected function detachFromTree(AbstractNestedNode $node) { if (true === $node->isRoot()) { return $this; } $this->refreshExistingNode($node) ->createQueryBuilder('n') ->set('n._leftnode', 'n._leftnode - :delta_node') ->set('n._r...
[ "protected", "function", "detachFromTree", "(", "AbstractNestedNode", "$", "node", ")", "{", "if", "(", "true", "===", "$", "node", "->", "isRoot", "(", ")", ")", "{", "return", "$", "this", ";", "}", "$", "this", "->", "refreshExistingNode", "(", "$", ...
Detach node from its tree, ie create a new tree from node. @param \BackBee\NestedNode\AbstractNestedNode $node @return \BackBee\NestedNode\Repository\NestedNodeRepository
[ "Detach", "node", "from", "its", "tree", "ie", "create", "a", "new", "tree", "from", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L616-L644
192,089
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository.refreshExistingNode
protected function refreshExistingNode(AbstractNestedNode $node) { if (true === $this->_em->contains($node)) { $this->_em->refresh($node); } elseif (null === $node = $this->find($node->getUid())) { $this->_em->persist($node); } return $this; }
php
protected function refreshExistingNode(AbstractNestedNode $node) { if (true === $this->_em->contains($node)) { $this->_em->refresh($node); } elseif (null === $node = $this->find($node->getUid())) { $this->_em->persist($node); } return $this; }
[ "protected", "function", "refreshExistingNode", "(", "AbstractNestedNode", "$", "node", ")", "{", "if", "(", "true", "===", "$", "this", "->", "_em", "->", "contains", "(", "$", "node", ")", ")", "{", "$", "this", "->", "_em", "->", "refresh", "(", "$"...
Refresh an existing node. @param \BackBee\NestedNode\AbstractNestedNode $node @return \BackBee\NestedNode\Repository\NestedNodeRepository
[ "Refresh", "an", "existing", "node", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L652-L661
192,090
backbee/backbee-php
NestedNode/Repository/NestedNodeRepository.php
NestedNodeRepository.detachOrPersistNode
protected function detachOrPersistNode(AbstractNestedNode $node) { if (null !== $refreshed = $this->find($node->getUid())) { return $this->detachFromTree($refreshed) ->refreshExistingNode($node); } if (false === $this->_em->contains($node)) { ...
php
protected function detachOrPersistNode(AbstractNestedNode $node) { if (null !== $refreshed = $this->find($node->getUid())) { return $this->detachFromTree($refreshed) ->refreshExistingNode($node); } if (false === $this->_em->contains($node)) { ...
[ "protected", "function", "detachOrPersistNode", "(", "AbstractNestedNode", "$", "node", ")", "{", "if", "(", "null", "!==", "$", "refreshed", "=", "$", "this", "->", "find", "(", "$", "node", "->", "getUid", "(", ")", ")", ")", "{", "return", "$", "thi...
Persist a new node or detach it from tree if already exists. @param \BackBee\NestedNode\AbstractNestedNode $node @return \BackBee\NestedNode\Repository\NestedNodeRepository
[ "Persist", "a", "new", "node", "or", "detach", "it", "from", "tree", "if", "already", "exists", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/NestedNode/Repository/NestedNodeRepository.php#L669-L681
192,091
backbee/backbee-php
Event/Listener/DoctrineListener.php
DoctrineListener.preFlush
public function preFlush(EventArgs $eventArgs) { $em = $eventArgs->getEntityManager(); $uow = $em->getUnitOfWork(); foreach ($uow->getScheduledEntityInsertions() as $entity) { $this->_triggerEvent(Events::preFlush, $entity, $eventArgs); } foreach ($uow->getSched...
php
public function preFlush(EventArgs $eventArgs) { $em = $eventArgs->getEntityManager(); $uow = $em->getUnitOfWork(); foreach ($uow->getScheduledEntityInsertions() as $entity) { $this->_triggerEvent(Events::preFlush, $entity, $eventArgs); } foreach ($uow->getSched...
[ "public", "function", "preFlush", "(", "EventArgs", "$", "eventArgs", ")", "{", "$", "em", "=", "$", "eventArgs", "->", "getEntityManager", "(", ")", ";", "$", "uow", "=", "$", "em", "->", "getUnitOfWork", "(", ")", ";", "foreach", "(", "$", "uow", "...
Occur on preFlush events. @access public @param Doctrine\Common\EventArgs $eventArgs
[ "Occur", "on", "preFlush", "events", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/DoctrineListener.php#L133-L149
192,092
backbee/backbee-php
Event/Listener/DoctrineListener.php
DoctrineListener.postLoad
public function postLoad(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::postLoad, $eventArgs->getEntity(), $eventArgs); } }
php
public function postLoad(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::postLoad, $eventArgs->getEntity(), $eventArgs); } }
[ "public", "function", "postLoad", "(", "EventArgs", "$", "eventArgs", ")", "{", "if", "(", "method_exists", "(", "$", "eventArgs", ",", "'getEntity'", ")", ")", "{", "$", "this", "->", "_triggerEvent", "(", "Events", "::", "postLoad", ",", "$", "eventArgs"...
Occur on postLoad events. @access public @param Doctrine\Common\EventArgs $eventArgs
[ "Occur", "on", "postLoad", "events", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/DoctrineListener.php#L208-L213
192,093
backbee/backbee-php
Event/Listener/DoctrineListener.php
DoctrineListener.postPersist
public function postPersist(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::postPersist, $eventArgs->getEntity(), $eventArgs); } }
php
public function postPersist(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::postPersist, $eventArgs->getEntity(), $eventArgs); } }
[ "public", "function", "postPersist", "(", "EventArgs", "$", "eventArgs", ")", "{", "if", "(", "method_exists", "(", "$", "eventArgs", ",", "'getEntity'", ")", ")", "{", "$", "this", "->", "_triggerEvent", "(", "Events", "::", "postPersist", ",", "$", "even...
Occur on postPersist events. @access public @param Doctrine\Common\EventArgs $eventArgs
[ "Occur", "on", "postPersist", "events", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/DoctrineListener.php#L222-L227
192,094
backbee/backbee-php
Event/Listener/DoctrineListener.php
DoctrineListener.preRemove
public function preRemove(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::preRemove, $eventArgs->getEntity(), $eventArgs); } }
php
public function preRemove(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::preRemove, $eventArgs->getEntity(), $eventArgs); } }
[ "public", "function", "preRemove", "(", "EventArgs", "$", "eventArgs", ")", "{", "if", "(", "method_exists", "(", "$", "eventArgs", ",", "'getEntity'", ")", ")", "{", "$", "this", "->", "_triggerEvent", "(", "Events", "::", "preRemove", ",", "$", "eventArg...
Occur on preRemove events. @access public @param Doctrine\Common\EventArgs $eventArgs
[ "Occur", "on", "preRemove", "events", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/DoctrineListener.php#L236-L241
192,095
backbee/backbee-php
Event/Listener/DoctrineListener.php
DoctrineListener.postRemove
public function postRemove(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::postRemove, $eventArgs->getEntity(), $eventArgs); } }
php
public function postRemove(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::postRemove, $eventArgs->getEntity(), $eventArgs); } }
[ "public", "function", "postRemove", "(", "EventArgs", "$", "eventArgs", ")", "{", "if", "(", "method_exists", "(", "$", "eventArgs", ",", "'getEntity'", ")", ")", "{", "$", "this", "->", "_triggerEvent", "(", "Events", "::", "postRemove", ",", "$", "eventA...
Occur on postRemove events. @access public @param Doctrine\Common\EventArgs $eventArgs
[ "Occur", "on", "postRemove", "events", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/DoctrineListener.php#L250-L255
192,096
backbee/backbee-php
Event/Listener/DoctrineListener.php
DoctrineListener.postUpdate
public function postUpdate(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::postUpdate, $eventArgs->getEntity(), $eventArgs); } }
php
public function postUpdate(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::postUpdate, $eventArgs->getEntity(), $eventArgs); } }
[ "public", "function", "postUpdate", "(", "EventArgs", "$", "eventArgs", ")", "{", "if", "(", "method_exists", "(", "$", "eventArgs", ",", "'getEntity'", ")", ")", "{", "$", "this", "->", "_triggerEvent", "(", "Events", "::", "postUpdate", ",", "$", "eventA...
Occur on postUpdate events. @access public @param Doctrine\Common\EventArgs $eventArgs
[ "Occur", "on", "postUpdate", "events", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/DoctrineListener.php#L264-L269
192,097
backbee/backbee-php
Event/Listener/DoctrineListener.php
DoctrineListener.prePersist
public function prePersist(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::prePersist, $eventArgs->getEntity(), $eventArgs); } }
php
public function prePersist(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::prePersist, $eventArgs->getEntity(), $eventArgs); } }
[ "public", "function", "prePersist", "(", "EventArgs", "$", "eventArgs", ")", "{", "if", "(", "method_exists", "(", "$", "eventArgs", ",", "'getEntity'", ")", ")", "{", "$", "this", "->", "_triggerEvent", "(", "Events", "::", "prePersist", ",", "$", "eventA...
Occur on prePersist events. @access public @param Doctrine\Common\EventArgs $eventArgs
[ "Occur", "on", "prePersist", "events", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/DoctrineListener.php#L278-L283
192,098
backbee/backbee-php
Event/Listener/DoctrineListener.php
DoctrineListener.preUpdate
public function preUpdate(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::preUpdate, $eventArgs->getEntity(), $eventArgs); } }
php
public function preUpdate(EventArgs $eventArgs) { if (method_exists($eventArgs, 'getEntity')) { $this->_triggerEvent(Events::preUpdate, $eventArgs->getEntity(), $eventArgs); } }
[ "public", "function", "preUpdate", "(", "EventArgs", "$", "eventArgs", ")", "{", "if", "(", "method_exists", "(", "$", "eventArgs", ",", "'getEntity'", ")", ")", "{", "$", "this", "->", "_triggerEvent", "(", "Events", "::", "preUpdate", ",", "$", "eventArg...
Occur on preUpdate events. @access public @param Doctrine\Common\EventArgs $eventArgs
[ "Occur", "on", "preUpdate", "events", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Event/Listener/DoctrineListener.php#L292-L297
192,099
backbee/backbee-php
Util/Sequence/Sequencer.php
Sequencer.getValue
public function getValue($name, $default = 0) { $current = $this->read($name, $default); return $this->update($name, $current + 1); }
php
public function getValue($name, $default = 0) { $current = $this->read($name, $default); return $this->update($name, $current + 1); }
[ "public", "function", "getValue", "(", "$", "name", ",", "$", "default", "=", "0", ")", "{", "$", "current", "=", "$", "this", "->", "read", "(", "$", "name", ",", "$", "default", ")", ";", "return", "$", "this", "->", "update", "(", "$", "name",...
Get the next sequence value. @param string $name @param int $default @return int
[ "Get", "the", "next", "sequence", "value", "." ]
d752ec7b609e538de60fb0bfcac478f6c9ed607c
https://github.com/backbee/backbee-php/blob/d752ec7b609e538de60fb0bfcac478f6c9ed607c/Util/Sequence/Sequencer.php#L87-L92