src/Generator/Writer/Model/Steps/StubReplaceSimple.php
protected function determineIfModelIsSluggable()
    {
        $this->context->modelIsSluggable                    = false;
        $this->context->modelIsParentOfSluggableTranslation = false;

        // if the model is sluggable and not translated, or this is the actual translation
        if ($this->data['sluggable']) {

            if (    ! isset($this->data->sluggable_setup['translated'])
                ||  ! $this->data->sluggable_setup['translated']
                ||  $this->data->is_translation
            ) {

                $this->context->modelIsSluggable = true;

            } else {
                // this is the parent of a translated sluggable model

                $this->context->modelIsParentOfSluggableTranslation = true;
            }
        }
    }
protected function determineIfModelIsSluggable()
    {
        $this->context->modelIsSluggable                    = false;
        $this->context->modelIsParentOfSluggableTranslation = false;

        // if the model is sluggable and not translated, or this is the actual translation
        if ($this->data['sluggable']) {

            if (    ! isset($this->data->sluggable_setup['translated'])
                ||  ! $this->data->sluggable_setup['translated']
                ||  $this->data->is_translation
            ) {

                $this->context->modelIsSluggable = true;

            } else {
                // this is the parent of a translated sluggable model

                $this->context->modelIsParentOfSluggableTranslation = true;
            }
        }
    }
protected function determineIfModelIsSluggable ( ) { $ this -> context -> modelIsSluggable = false ; $ this -> context -> modelIsParentOfSluggableTranslation = false ; // if the model is sluggable and not translated, or this is the actual translation if ( $ this -> data [ 'sluggable' ] ) { if ( ! isset ( $ this -> data -> sluggable_setup [ 'translated' ] ) || ! $ this -> data -> sluggable_setup [ 'translated' ] || $ this -> data -> is_translation ) { $ this -> context -> modelIsSluggable = true ; } else { // this is the parent of a translated sluggable model $ this -> context -> modelIsParentOfSluggableTranslation = true ; } } }
Determines and stores whether model itself is sluggable
If so, it will have both the trait and implement the interface
Determines and stores whether model itself is sluggable If so it will have both the trait and implement the interface