1. Go to this page and download the library: Download thelia/feature-type-module library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thelia / feature-type-module example snippets
/**
* Returns a value based on the slug, feature_av_id and locale
*
* <code>
* $value = FeatureType::getValue('color', 2);
* </code>
*
* @param string $slug
* @param int $featureId
* @param string $locale
* @return string
* @throws \Propel\Runtime\Exception\PropelException
*/
public static function getValue($slug, $featureId, $locale = 'en_US')
/**
* Returns a set of values
* If the value does not exist, it is replaced by null
*
* <code>
* $values = FeatureType::getValue(['color','texture'], [4,7]);
* </code>
*
* <sample>
* array(
* 'color' => [4 => '#00000', 7 => '#FFF000'],
* 'texture' => [4 => null, 7 => 'lines.jpg']
* )
* </sample>
*
* @param string[] $slugs
* @param int[] $featureIds
* @param string $locale
* @return string
* @throws \Propel\Runtime\Exception\PropelException
*/
public static function getValues(array $slugs, array $featureIds, $locale = 'en_US')
/**
* Returns a set of first values
* If the value does not exist, it is replaced by null
*
* <code>
* $values = FeatureType::getFirstValues(['color','texture', 'other'], [4,7]);
* </code>
*
* <sample>
* array(
* 'color' => '#00000',
* 'texture' => 'lines.jpg',
* 'other' => null
* )
* </sample>
*
* @param string[] $slugs
* @param int[] $featureIds
* @param string $locale
* @return array
*/
public static function getFirstValues(array $slugs, array $featureIds, $locale = 'en_US')