_id
stringlengths
2
7
title
stringlengths
3
151
partition
stringclasses
3 values
text
stringlengths
33
8k
language
stringclasses
1 value
meta_information
dict
q21600
Blur.getBlur
train
public function getBlur() { if (!is_numeric($this->blur)) { return; }
php
{ "resource": "" }
q21601
Orientation.run
train
public function run(Image $image) { $orientation = $this->getOrientation(); if ($orientation === 'auto') {
php
{ "resource": "" }
q21602
Encode.run
train
public function run(Image $image) { $format = $this->getFormat($image); $quality = $this->getQuality(); if (in_array($format, ['jpg', 'pjpg'], true)) { $image = $image->getDriver()
php
{ "resource": "" }
q21603
Encode.getFormat
train
public function getFormat(Image $image) { $allowed = [ 'gif' => 'image/gif', 'jpg' => 'image/jpeg', 'pjpg' => 'image/jpeg', 'png' => 'image/png', 'webp' => 'image/webp', ]; if (array_key_exists($this->fm, $allowed))
php
{ "resource": "" }
q21604
Encode.getQuality
train
public function getQuality() { $default = 90; if (!is_numeric($this->q)) {
php
{ "resource": "" }
q21605
Crop.run
train
public function run(Image $image) { $coordinates = $this->getCoordinates($image); if ($coordinates) { $coordinates = $this->limitToImageBoundaries($image, $coordinates); $image->crop( $coordinates[0],
php
{ "resource": "" }
q21606
Crop.getCoordinates
train
public function getCoordinates(Image $image) { $coordinates = explode(',', $this->crop); if (count($coordinates) !== 4 or (!is_numeric($coordinates[0])) or (!is_numeric($coordinates[1])) or (!is_numeric($coordinates[2])) or (!is_numeric($coordinates[3...
php
{ "resource": "" }
q21607
Crop.limitToImageBoundaries
train
public function limitToImageBoundaries(Image $image, array $coordinates) { if ($coordinates[0] > ($image->width() - $coordinates[2])) { $coordinates[0] = $image->width() - $coordinates[2]; }
php
{ "resource": "" }
q21608
Signature.generateSignature
train
public function generateSignature($path, array $params) { unset($params['s']); ksort($params);
php
{ "resource": "" }
q21609
Size.run
train
public function run(Image $image) { $width = $this->getWidth(); $height = $this->getHeight(); $fit = $this->getFit(); $dpr = $this->getDpr(); list($width, $height) = $this->resolveMissingDimensions($image, $width, $height); list($width, $height) = $this->applyDpr($wi...
php
{ "resource": "" }
q21610
Size.getFit
train
public function getFit() { if (in_array($this->fit, ['contain', 'fill', 'max', 'stretch'], true)) { return $this->fit; } if
php
{ "resource": "" }
q21611
Size.getDpr
train
public function getDpr() { if (!is_numeric($this->dpr)) { return 1.0;
php
{ "resource": "" }
q21612
Size.resolveMissingDimensions
train
public function resolveMissingDimensions(Image $image, $width, $height) { if (is_null($width) and is_null($height)) { $width = $image->width(); $height = $image->height();
php
{ "resource": "" }
q21613
Size.applyDpr
train
public function applyDpr($width, $height, $dpr) { $width = $width * $dpr;
php
{ "resource": "" }
q21614
Size.limitImageSize
train
public function limitImageSize($width, $height) { if ($this->maxImageSize !== null) { $imageSize = $width * $height; if ($imageSize > $this->maxImageSize) { $width = $width / sqrt($imageSize / $this->maxImageSize);
php
{ "resource": "" }
q21615
Size.runResize
train
public function runResize(Image $image, $fit, $width, $height) { if ($fit === 'contain') { return $this->runContainResize($image, $width, $height); } if ($fit === 'fill') { return $this->runFillResize($image, $width, $height); } if ($fit === 'max') {...
php
{ "resource": "" }
q21616
Size.runContainResize
train
public function runContainResize(Image $image, $width, $height) { return $image->resize($width, $height, function ($constraint)
php
{ "resource": "" }
q21617
Size.runMaxResize
train
public function runMaxResize(Image $image, $width, $height) { return $image->resize($width, $height,
php
{ "resource": "" }
q21618
Size.runFillResize
train
public function runFillResize($image, $width, $height) { $image = $this->runMaxResize($image, $width, $height);
php
{ "resource": "" }
q21619
Size.runCropResize
train
public function runCropResize(Image $image, $width, $height) { list($resize_width, $resize_height) = $this->resolveCropResizeDimensions($image, $width, $height); $zoom = $this->getCrop()[2]; $image->resize($resize_width * $zoom, $resize_height * $zoom, function ($constraint) { ...
php
{ "resource": "" }
q21620
Size.resolveCropResizeDimensions
train
public function resolveCropResizeDimensions(Image $image, $width, $height) { if ($height > $width * ($image->height() / $image->width())) { return [$height *
php
{ "resource": "" }
q21621
Size.resolveCropOffset
train
public function resolveCropOffset(Image $image, $width, $height) { list($offset_percentage_x, $offset_percentage_y) = $this->getCrop(); $offset_x = (int) (($image->width() * $offset_percentage_x / 100) - ($width / 2)); $offset_y = (int) (($image->height() * $offset_percentage_y / 100) - ($h...
php
{ "resource": "" }
q21622
Size.getCrop
train
public function getCrop() { $cropMethods = [ 'crop-top-left' => [0, 0, 1.0], 'crop-top' => [50, 0, 1.0], 'crop-top-right' => [100, 0, 1.0], 'crop-left' => [0, 50, 1.0], 'crop-center' => [50, 50, 1.0], 'crop-right' => [100, 50, 1.0], ...
php
{ "resource": "" }
q21623
Pixelate.run
train
public function run(Image $image) { $pixelate = $this->getPixelate(); if ($pixelate !== null) {
php
{ "resource": "" }
q21624
Pixelate.getPixelate
train
public function getPixelate() { if (!is_numeric($this->pixel)) { return; }
php
{ "resource": "" }
q21625
Dimension.get
train
public function get($value) { if (is_numeric($value) and $value > 0) { return (double) $value * $this->dpr; } if (preg_match('/^(\d{1,2}(?!\d)|100)(w|h)$/', $value, $matches)) { if ($matches[2] === 'h') {
php
{ "resource": "" }
q21626
Flip.run
train
public function run(Image $image) { if ($flip = $this->getFlip()) { if ($flip === 'both') {
php
{ "resource": "" }
q21627
Brightness.run
train
public function run(Image $image) { $brightness = $this->getBrightness(); if ($brightness !== null) {
php
{ "resource": "" }
q21628
Brightness.getBrightness
train
public function getBrightness() { if (!preg_match('/^-*[0-9]+$/', $this->bri)) {
php
{ "resource": "" }
q21629
Api.setManipulators
train
public function setManipulators(array $manipulators) { foreach ($manipulators as $manipulator) { if (!($manipulator instanceof ManipulatorInterface)) {
php
{ "resource": "" }
q21630
Api.run
train
public function run($source, array $params) { $image = $this->imageManager->make($source); foreach ($this->manipulators as $manipulator) { $manipulator->setParams($params);
php
{ "resource": "" }
q21631
Background.run
train
public function run(Image $image) { if (is_null($this->bg)) { return $image; } $color = (new Color($this->bg))->formatted(); if ($color) { $new = $image->getDriver()->newImage($image->width(), $image->height(), $color);
php
{ "resource": "" }
q21632
Gamma.run
train
public function run(Image $image) { $gamma = $this->getGamma(); if ($gamma) {
php
{ "resource": "" }
q21633
Gamma.getGamma
train
public function getGamma() { if (!preg_match('/^[0-9]\.*[0-9]*$/', $this->gam)) {
php
{ "resource": "" }
q21634
UrlBuilderFactory.create
train
public static function create($baseUrl, $signKey = null) { $httpSignature = null; if (!is_null($signKey)) {
php
{ "resource": "" }
q21635
Watermark.run
train
public function run(Image $image) { if ($watermark = $this->getImage($image)) { $markw = $this->getDimension($image, 'markw'); $markh = $this->getDimension($image, 'markh'); $markx = $this->getDimension($image, 'markx'); $marky = $this->getDimension($image, 'm...
php
{ "resource": "" }
q21636
Watermark.getImage
train
public function getImage(Image $image) { if (is_null($this->watermarks)) { return; } if (!is_string($this->mark)) { return; } if ($this->mark === '') { return; } $path = $this->mark; if ($this->watermarksPathPref...
php
{ "resource": "" }
q21637
Watermark.getDimension
train
public function getDimension(Image $image, $field) { if ($this->{$field}) {
php
{ "resource": "" }
q21638
Watermark.getAlpha
train
public function getAlpha() { if (!is_numeric($this->markalpha)) { return 100; }
php
{ "resource": "" }
q21639
Server.getSourcePath
train
public function getSourcePath($path) { $path = trim($path, '/'); $baseUrl = $this->baseUrl.'/'; if (substr($path, 0, strlen($baseUrl)) === $baseUrl) { $path = trim(substr($path, strlen($baseUrl)), '/'); } if ($path === '') {
php
{ "resource": "" }
q21640
Server.getCachePath
train
public function getCachePath($path, array $params = []) { $sourcePath = $this->getSourcePath($path); if ($this->sourcePathPrefix) { $sourcePath = substr($sourcePath, strlen($this->sourcePathPrefix) + 1); } $params = $this->getAllParams($params); unset($params['s...
php
{ "resource": "" }
q21641
Server.cacheFileExists
train
public function cacheFileExists($path, array $params) { return $this->cache->has(
php
{ "resource": "" }
q21642
Server.deleteCache
train
public function deleteCache($path) { if (!$this->groupCacheInFolders) { throw new InvalidArgumentException( 'Deleting cached image manipulations is not possible when grouping cache into folders is disabled.'
php
{ "resource": "" }
q21643
Server.getAllParams
train
public function getAllParams(array $params) { $all = $this->defaults; if (isset($params['p'])) { foreach (explode(',', $params['p']) as $preset) { if (isset($this->presets[$preset])) {
php
{ "resource": "" }
q21644
Server.makeImage
train
public function makeImage($path, array $params) { $sourcePath = $this->getSourcePath($path); $cachedPath = $this->getCachePath($path, $params); if ($this->cacheFileExists($path, $params) === true) { return $cachedPath; } if ($this->sourceFileExists($path) === fa...
php
{ "resource": "" }
q21645
Border.run
train
public function run(Image $image) { if ($border = $this->getBorder($image)) { list($width, $color, $method) = $border; if ($method === 'overlay') { return $this->runOverlay($image, $width, $color);
php
{ "resource": "" }
q21646
Border.getBorder
train
public function getBorder(Image $image) { if (!$this->border) { return; } $values = explode(',', $this->border); $width = $this->getWidth($image, $this->getDpr(), isset($values[0]) ? $values[0] : null); $color = $this->getColor(isset($values[1]) ?
php
{ "resource": "" }
q21647
Border.getWidth
train
public function getWidth(Image $image, $dpr, $width)
php
{ "resource": "" }
q21648
Border.runOverlay
train
public function runOverlay(Image $image, $width, $color) { return $image->rectangle( $width / 2, $width / 2, $image->width() - ($width / 2), $image->height() - ($width / 2),
php
{ "resource": "" }
q21649
Border.runShrink
train
public function runShrink(Image $image, $width, $color) { return $image ->resize( $image->width() - ($width * 2),
php
{ "resource": "" }
q21650
Border.runExpand
train
public function runExpand(Image $image, $width, $color) { return $image->resizeCanvas( $width * 2, $width * 2,
php
{ "resource": "" }
q21651
UrlBuilder.setBaseUrl
train
public function setBaseUrl($baseUrl) { if (substr($baseUrl, 0, 2) === '//') { $baseUrl = 'http:'.$baseUrl;
php
{ "resource": "" }
q21652
MenuBuilder.createSidebarMenu
train
public function createSidebarMenu() { $menu = $this->factory->createItem('root'); foreach ($this->pool->getAdminGroups() as $name => $group) { $extras = [ 'icon' => $group['icon'], 'label_catalogue' => $group['label_catalogue'], 'roles' =>...
php
{ "resource": "" }
q21653
BaseGroupedMapper.ifTrue
train
public function ifTrue($bool) { if (null !== $this->apply) { throw new \RuntimeException('Cannot
php
{ "resource": "" }
q21654
BaseGroupedMapper.ifFalse
train
public function ifFalse($bool) { if (null !== $this->apply) { throw new \RuntimeException('Cannot
php
{ "resource": "" }
q21655
BaseGroupedMapper.end
train
public function end() { if (null !== $this->currentGroup) { $this->currentGroup = null; } elseif (null !== $this->currentTab) { $this->currentTab = null; } else {
php
{ "resource": "" }
q21656
BaseGroupedMapper.addFieldToCurrentGroup
train
protected function addFieldToCurrentGroup($fieldName) { // Note this line must happen before the next line. // See https://github.com/sonata-project/SonataAdminBundle/pull/1351 $currentGroup = $this->getCurrentGroupName();
php
{ "resource": "" }
q21657
BaseGroupedMapper.getCurrentGroupName
train
protected function getCurrentGroupName() { if (!$this->currentGroup) {
php
{ "resource": "" }
q21658
ModelsToArrayTransformer.legacyConstructor
train
private function legacyConstructor(array $args) { $choiceList = $args[0]; if (!$choiceList instanceof ModelChoiceList && !$choiceList instanceof ModelChoiceLoader && !$choiceList instanceof LazyChoiceList) { throw new RuntimeException('First param passed to Model...
php
{ "resource": "" }
q21659
AdminObjectAclManipulator.createAclUsersForm
train
public function createAclUsersForm(AdminObjectAclData $data) { $aclValues = $data->getAclUsers(); $formBuilder = $this->formFactory->createNamedBuilder(self::ACL_USERS_FORM_NAME, FormType::class);
php
{ "resource": "" }
q21660
AdminObjectAclManipulator.createAclRolesForm
train
public function createAclRolesForm(AdminObjectAclData $data) { $aclValues = $data->getAclRoles(); $formBuilder = $this->formFactory->createNamedBuilder(self::ACL_ROLES_FORM_NAME, FormType::class);
php
{ "resource": "" }
q21661
AdminObjectAclManipulator.updateAclUsers
train
public function updateAclUsers(AdminObjectAclData $data) { $aclValues = $data->getAclUsers();
php
{ "resource": "" }
q21662
AdminObjectAclManipulator.updateAclRoles
train
public function updateAclRoles(AdminObjectAclData $data) { $aclValues = $data->getAclRoles();
php
{ "resource": "" }
q21663
AdminObjectAclManipulator.buildAcl
train
protected function buildAcl(AdminObjectAclData $data, Form $form, \Traversable $aclValues) { $masks = $data->getMasks(); $acl = $data->getAcl(); $matrices = $form->getData(); foreach ($aclValues as $aclValue) { foreach ($matrices as $key => $matrix) { if ...
php
{ "resource": "" }
q21664
ExtensionCompilerPass.addExtension
train
private function addExtension( array &$targets, string $target, string $extension, array $attributes ): void { if (!isset($targets[$target])) { $targets[$target] = new \SplPriorityQueue(); }
php
{ "resource": "" }
q21665
AdminHelper.addNewInstance
train
public function addNewInstance($object, FieldDescriptionInterface $fieldDescription) { $instance = $fieldDescription->getAssociationAdmin()->getNewInstance(); $mapping = $fieldDescription->getAssociationMapping(); $method = sprintf('add%s', Inflector::classify($mapping['fieldName'])); ...
php
{ "resource": "" }
q21666
AdminHelper.getElementAccessPath
train
public function getElementAccessPath($elementId, $entity) { $propertyAccessor = $this->pool->getPropertyAccessor(); $idWithoutIdentifier = preg_replace('/^[^_]*_/', '', $elementId); $initialPath = preg_replace('#(_(\d+)_)#', '[$2]_', $idWithoutIdentifier); $parts = explode('_', $in...
php
{ "resource": "" }
q21667
AdminHelper.getEntityClassName
train
protected function getEntityClassName(AdminInterface $admin, $elements) { $element = array_shift($elements); $associationAdmin = $admin->getFormFieldDescription($element)->getAssociationAdmin(); if (0 === \count($elements)) {
php
{ "resource": "" }
q21668
AdminObjectAclData.getUserPermissions
train
public function getUserPermissions() { $permissions = $this->getPermissions(); if (!$this->isOwner()) { foreach (self::$ownerPermissions as $permission) { $key = array_search($permission, $permissions, true);
php
{ "resource": "" }
q21669
AdminObjectAclData.updateMasks
train
protected function updateMasks() { $permissions = $this->getPermissions(); $reflectionClass = new \ReflectionClass(new $this->maskBuilderClass()); $this->masks = [];
php
{ "resource": "" }
q21670
Pager.getLinks
train
public function getLinks($nbLinks = null) { if (null === $nbLinks) { $nbLinks = $this->getMaxPageLinks(); } $links = []; $tmp = $this->page - floor($nbLinks / 2); $check = $this->lastPage - $nbLinks + 1;
php
{ "resource": "" }
q21671
Pager.setCursor
train
public function setCursor($pos) { if ($pos < 1) { $this->cursor = 1; } else { if ($pos > $this->nbResults) {
php
{ "resource": "" }
q21672
Pager.initializeIterator
train
protected function initializeIterator() { $this->results = $this->getResults();
php
{ "resource": "" }
q21673
Pager.retrieveObject
train
protected function retrieveObject($offset) { $queryForRetrieve = clone $this->getQuery(); $queryForRetrieve ->setFirstResult($offset - 1)
php
{ "resource": "" }
q21674
Admin.generateFallback
train
private function generateFallback($name): void { if (empty($name)) { return; } if (preg_match(AdminClass::CLASS_REGEX, $name, $matches)) { if (empty($this->group)) { $this->group =
php
{ "resource": "" }
q21675
AddDependencyCallsCompilerPass.applyConfigurationFromAttribute
train
public function applyConfigurationFromAttribute(Definition $definition, array $attributes) { $keys = [ 'model_manager', 'form_contractor', 'show_builder', 'list_builder', 'datagrid_builder', 'translator', 'configuration_pool...
php
{ "resource": "" }
q21676
AddDependencyCallsCompilerPass.replaceDefaultArguments
train
private function replaceDefaultArguments( array $defaultArguments, Definition $definition, Definition $parentDefinition = null ): void { $arguments = $definition->getArguments(); $parentArguments = $parentDefinition ? $parentDefinition->getArguments() : []; foreach (...
php
{ "resource": "" }
q21677
ObjectAclManipulator.configureAcls
train
public function configureAcls( OutputInterface $output, AdminInterface $admin, \Traversable $oids, UserSecurityIdentity $securityIdentity = null ) { $countAdded = 0; $countUpdated = 0; $securityHandler = $admin->getSecurityHandler(); if (!$securityHand...
php
{ "resource": "" }
q21678
RetrieveAutocompleteItemsAction.retrieveFilterFieldDescription
train
private function retrieveFilterFieldDescription( AdminInterface $admin, string $field ): FieldDescriptionInterface { $admin->getFilterFieldDescriptions(); $fieldDescription = $admin->getFilterFieldDescription($field); if (!$fieldDescription) { throw new \Runtime...
php
{ "resource": "" }
q21679
Pool.getInstance
train
public function getInstance($id) { if (!\in_array($id, $this->adminServiceIds, true)) { $msg = sprintf('Admin service "%s" not found in admin pool.', $id); $shortest = -1; $closest = null; $alternatives = []; foreach ($this->adminServiceIds as $adm...
php
{ "resource": "" }
q21680
AdminExporter.getAvailableFormats
train
public function getAvailableFormats(AdminInterface $admin): array { $adminExportFormats = $admin->getExportFormats(); // NEXT_MAJOR : compare with null if ($adminExportFormats !== ['json', 'xml',
php
{ "resource": "" }
q21681
AdminExporter.getExportFilename
train
public function getExportFilename(AdminInterface $admin, string $format): string { $class = $admin->getClass(); return sprintf( 'export_%s_%s.%s',
php
{ "resource": "" }
q21682
CoreController.searchAction
train
public function searchAction(Request $request) { $searchAction
php
{ "resource": "" }
q21683
TypeGuesserChain.guess
train
private function guess(\Closure $closure): Guess { $guesses = []; foreach ($this->guessers as $guesser) { if ($guess = $closure($guesser)) { $guesses[]
php
{ "resource": "" }
q21684
AbstractAdmin.initialize
train
public function initialize() { if (!$this->classnameLabel) { /* NEXT_MAJOR: remove cast to string, null is not supposed to be supported but was documented as such */ $this->classnameLabel = substr( (string) $this->getClass(),
php
{ "resource": "" }
q21685
AbstractAdmin.getBaseRoutePattern
train
public function getBaseRoutePattern() { if (null !== $this->cachedBaseRoutePattern) { return $this->cachedBaseRoutePattern; } if ($this->isChild()) { // the admin class is a child, prefix it with the parent route pattern $baseRoutePattern = $this->baseRoutePattern; ...
php
{ "resource": "" }
q21686
AbstractAdmin.getBaseRouteName
train
public function getBaseRouteName() { if (null !== $this->cachedBaseRouteName) { return $this->cachedBaseRouteName; } if ($this->isChild()) { // the admin class is a child, prefix it with the parent route name $baseRouteName = $this->baseRouteName; if (!$t...
php
{ "resource": "" }
q21687
AbstractAdmin.buildBreadcrumbs
train
public function buildBreadcrumbs($action, MenuItemInterface $menu = null) { @trigger_error( 'The '.__METHOD__.' method is deprecated since version 3.2 and will be removed in 4.0.', E_USER_DEPRECATED ); if (isset($this->breadcrumbs[$action])) {
php
{ "resource": "" }
q21688
AbstractAdmin.hasAccess
train
public function hasAccess($action, $object = null) { $access = $this->getAccess(); if (!\array_key_exists($action, $access)) { return false; } if (!\is_array($access[$action])) { $access[$action] = [$access[$action]]; }
php
{ "resource": "" }
q21689
AbstractAdmin.getDashboardActions
train
public function getDashboardActions() { $actions = []; if ($this->hasRoute('create') && $this->hasAccess('create')) { $actions['create'] = [ 'label' => 'link_add', 'translation_domain' => 'SonataAdminBundle', // NEXT_MAJOR: Remove this lin...
php
{ "resource": "" }
q21690
AbstractAdmin.isDefaultFilter
train
final public function isDefaultFilter($name) { $filter = $this->getFilterParameters(); $default = $this->getDefaultFilterValues();
php
{ "resource": "" }
q21691
AbstractAdmin.canAccessObject
train
public function canAccessObject($action, $object) { return $object && $this->id($object)
php
{ "resource": "" }
q21692
AbstractAdmin.getDefaultFilterValues
train
final protected function getDefaultFilterValues() { $defaultFilterValues = []; $this->configureDefaultFilterValues($defaultFilterValues); foreach ($this->getExtensions() as $extension) { // NEXT_MAJOR: remove method check in next major release if (method_exists($ext...
php
{ "resource": "" }
q21693
AbstractAdmin.configureTabMenu
train
protected function configureTabMenu(MenuItemInterface $menu, $action, AdminInterface $childAdmin = null) { // Use configureSideMenu not to mess with previous overrides // TODO
php
{ "resource": "" }
q21694
AbstractAdmin.buildShow
train
protected function buildShow() { if ($this->show) { return; } $this->show = new FieldDescriptionCollection(); $mapper = new ShowMapper($this->showBuilder, $this->show, $this); $this->configureShowFields($mapper);
php
{ "resource": "" }
q21695
AbstractAdmin.buildList
train
protected function buildList() { if ($this->list) { return; } $this->list = $this->getListBuilder()->getBaseList(); $mapper = new ListMapper($this->getListBuilder(), $this->list, $this); if (\count($this->getBatchActions()) > 0 && $this->hasRequest() && !$this-...
php
{ "resource": "" }
q21696
AbstractAdmin.buildForm
train
protected function buildForm() { if ($this->form) { return; } // append parent object if any // todo : clean the way the Admin class can retrieve set the object if ($this->isChild() && $this->getParentAssociationMapping()) { $parent = $this->getParent...
php
{ "resource": "" }
q21697
AbstractAdmin.getSubClass
train
protected function getSubClass($name) { if ($this->hasSubClass($name)) { return $this->subClasses[$name]; } throw new \RuntimeException(sprintf( 'Unable to find
php
{ "resource": "" }
q21698
AbstractAdmin.attachInlineValidator
train
protected function attachInlineValidator() { $admin = $this; // add the custom inline validation option $metadata = $this->validator->getMetadataFor($this->getClass()); $metadata->addConstraint(new InlineConstraint([ 'service' => $this, 'method' => static fu...
php
{ "resource": "" }
q21699
AbstractAdmin.predefinePerPageOptions
train
protected function predefinePerPageOptions() { array_unshift($this->perPageOptions, $this->maxPerPage);
php
{ "resource": "" }