public function listStatus()
    {
        $data = [];

        // create a reflection class to get constants
        $refl = new ReflectionClass(get_called_class());
        $constants = $refl->getConstants();

        // check for status constants (e.g., STATUS_ACTIVE)
        foreach ($constants as $constantName => $constantValue) {

            // add prettified name to dropdown
            if (strpos($constantName, "STATUS_") === 0) {
                $prettyName = str_replace("STATUS_", "", $constantName);
                $prettyName = Inflector::humanize(strtolower($prettyName));
                $data[$constantValue] = $prettyName;
            }
        }

        return $data;
    }
public function listStatus()
    {
        $data = [];

        // create a reflection class to get constants
        $refl = new ReflectionClass(get_called_class());
        $constants = $refl->getConstants();

        // check for status constants (e.g., STATUS_ACTIVE)
        foreach ($constants as $constantName => $constantValue) {

            // add prettified name to dropdown
            if (strpos($constantName, "STATUS_") === 0) {
                $prettyName = str_replace("STATUS_", "", $constantName);
                $prettyName = Inflector::humanize(strtolower($prettyName));
                $data[$constantValue] = $prettyName;
            }
        }

        return $data;
    }
public function listStatus ( ) { $ data = [ ] ; // create a reflection class to get constants $ refl = new ReflectionClass ( get_called_class ( ) ) ; $ constants = $ refl -> getConstants ( ) ; // check for status constants (e.g., STATUS_ACTIVE) foreach ( $ constants as $ constantName => $ constantValue ) { // add prettified name to dropdown if ( strpos ( $ constantName , "STATUS_" ) === 0 ) { $ prettyName = str_replace ( "STATUS_" , "" , $ constantName ) ; $ prettyName = Inflector :: humanize ( strtolower ( $ prettyName ) ) ; $ data [ $ constantValue ] = $ prettyName ; } } return $ data ; }
Returns lists of status available
@return array
Returns lists of status available