src/Service/FieldType.php
public function getBySlug($sSlug, $bOnlySelectable = false)
    {
        $aAvailable = $this->getAll($bOnlySelectable);

        foreach ($aAvailable as $oType) {

            if ($oType->slug == $sSlug) {

                if (!isset($oType->instance)) {
                    $oType->instance = Factory::factory(
                        $oType->component,
                        $oType->provider
                    );
                }

                return $oType->instance;
            }
        }

        return null;
    }
public function getBySlug($sSlug, $bOnlySelectable = false)
    {
        $aAvailable = $this->getAll($bOnlySelectable);

        foreach ($aAvailable as $oType) {

            if ($oType->slug == $sSlug) {

                if (!isset($oType->instance)) {
                    $oType->instance = Factory::factory(
                        $oType->component,
                        $oType->provider
                    );
                }

                return $oType->instance;
            }
        }

        return null;
    }
public function getBySlug ( $ sSlug , $ bOnlySelectable = false ) { $ aAvailable = $ this -> getAll ( $ bOnlySelectable ) ; foreach ( $ aAvailable as $ oType ) { if ( $ oType -> slug == $ sSlug ) { if ( ! isset ( $ oType -> instance ) ) { $ oType -> instance = Factory :: factory ( $ oType -> component , $ oType -> provider ) ; } return $ oType -> instance ; } } return null ; }
Get an individual field type instance by it's slug

@param  string  $sSlug           The Field Type's slug
@param  boolean $bOnlySelectable Filter out field types which are not selectable by the user

@return object
Get an individual field type instance by it s slug