Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | protected function execute(ConduitAPIRequest $request) { | ||||
| $slugs = $request->getValue('slugs'); | $slugs = $request->getValue('slugs'); | ||||
| if ($slugs) { | if ($slugs) { | ||||
| $query->withSlugs($slugs); | $query->withSlugs($slugs); | ||||
| } | } | ||||
| $request->getValue('icons'); | $request->getValue('icons'); | ||||
| if ($request->getValue('icons')) { | if ($request->getValue('icons')) { | ||||
| $icons = array(); | $icons = array(); | ||||
| // the internal 'fa-' prefix is a detail hidden from api clients | |||||
| // but needs to pre prepended to the values in the icons array: | |||||
| foreach ($request->getValue('icons') as $value) { | |||||
| $icons[] = 'fa-'.$value; | |||||
| } | |||||
| $query->withIcons($icons); | $query->withIcons($icons); | ||||
| } | } | ||||
| $colors = $request->getValue('colors'); | $colors = $request->getValue('colors'); | ||||
| if ($colors) { | if ($colors) { | ||||
| $query->withColors($colors); | $query->withColors($colors); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines | |||||