PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
wiloke-listing-tools
/
app
/
Framework
/
Helpers
<?php namespace WilokeListingTools\Framework\Helpers; use WilokeListingTools\Framework\Helpers\Collection\ArrayCollection; final class AddListingFieldSkeleton { private $postType; private $searchFieldKey; private $aSearchUsedFields; private $aCacheFields; public function __construct($postType) { $this->postType = $postType; $this->setSearchFieldKey(); $this->setFields(); } public function setSearchFieldKey() { $this->searchFieldKey = General::getUsedSectionKey($this->postType); } private function rebuildSearchFields($aFields) { $oCollection = new ArrayCollection($aFields); return $oCollection->magicKeyGroup('key')->output(); } private function setFields(): void { if (!isset($this->aCacheFields[$this->postType])) { $this->aCacheFields[$this->postType] = GetSettings::getOptions($this->searchFieldKey); } $this->aSearchUsedFields = $this->rebuildSearchFields($this->aCacheFields[$this->postType]); } public function getFields(): ?array { return is_array($this->aSearchUsedFields) ? $this->aSearchUsedFields : []; } /** * @param $fieldKey * * @return array|null */ public function getField($fieldKey): ?array { return isset($this->aSearchUsedFields[$fieldKey]) ? $this->aSearchUsedFields[$fieldKey] : null; } public function getFieldParam($fieldKey, $param, $std = '') { $aField = $this->getField($fieldKey); if (empty($aField)) { return null; } $oCollection = new ArrayCollection($aField); return $oCollection->deepPluck($param)->output($std); } }
[+]
..
[-] SearchFieldSkeleton.php
[edit]
[-] FileSystem.php
[edit]
[-] Response.php
[edit]
[-] GetWilokeSubmission.php
[edit]
[-] AbstractSkeleton.php
[edit]
[-] InheritCMB2Styles.php
[edit]
[-] ReviewSkeleton.php
[edit]
[-] RestaurantMenu.php
[edit]
[-] WooCommerce.php
[edit]
[-] MapHelpers.php
[edit]
[-] .DS_Store
[edit]
[-] Message.php
[edit]
[-] GetSettings.php
[edit]
[-] QueryHelper.php
[edit]
[+]
Collection
[-] Inc.php
[edit]
[-] UserSkeleton.php
[edit]
[-] Firebase.php
[edit]
[-] Repository.php
[edit]
[-] DebugStatus.php
[edit]
[-] MapFactory.php
[edit]
[-] SetSettings.php
[edit]
[-] AddListingFieldSkeleton.php
[edit]
[-] VideoHelper.php
[edit]
[-] SearchFormSkeleton.php
[edit]
[-] PostSkeleton.php
[edit]
[-] KCHelpers.php
[edit]
[-] ProductSkeleton.php
[edit]
[-] QRCodeGenerator.php
[edit]
[-] HTML.php
[edit]
[-] Time.php
[edit]
[-] PlanHelper.php
[edit]
[-] SemanticUi.php
[edit]
[-] AjaxMsg.php
[edit]
[-] Logger.php
[edit]
[-] Cookie.php
[edit]
[-] Validation.php
[edit]
[-] GalleryHelper.php
[edit]
[-] AuthorSkeleton.php
[edit]
[-] General.php
[edit]
[-] Submission.php
[edit]
[-] TermSetting.php
[edit]