src/Repository/Categories.php
public function createDefaultCategory($value)
    {
        if (is_array($value)) {
            $value = isset($value['value']) ? $value['value'] : '';
        }

        if ('professions' != $value && 'employmentTypes' != $value && 'industries' != $value) {
            return null;
        }

        $builder = $this->getService('Jobs/DefaultCategoriesBuilder');

        $category = $builder->build($value);

        $this->store($category);

        return $category;
    }
public function createDefaultCategory($value)
    {
        if (is_array($value)) {
            $value = isset($value['value']) ? $value['value'] : '';
        }

        if ('professions' != $value && 'employmentTypes' != $value && 'industries' != $value) {
            return null;
        }

        $builder = $this->getService('Jobs/DefaultCategoriesBuilder');

        $category = $builder->build($value);

        $this->store($category);

        return $category;
    }
public function createDefaultCategory ( $ value ) { if ( is_array ( $ value ) ) { $ value = isset ( $ value [ 'value' ] ) ? $ value [ 'value' ] : '' ; } if ( 'professions' != $ value && 'employmentTypes' != $ value && 'industries' != $ value ) { return null ; } $ builder = $ this -> getService ( 'Jobs/DefaultCategoriesBuilder' ) ; $ category = $ builder -> build ( $ value ) ; $ this -> store ( $ category ) ; return $ category ; }
Creates and stores the default category hirarchy for the given value.

@param array|string $value

@return null|\Jobs\Entity\Category
Creates and stores the default category hirarchy for the given value .