public function attachmentTypes()
    {
        $attachableObjects = $this->attachableObjects();

        $out = [];

        if (!$attachableObjects) {
            return $out;
        }

        $i = 0;
        foreach ($attachableObjects as $attType => $attMeta) {
            $i++;
            $label = $attMeta['label'];

            $out[] = [
                'id'             => (isset($attMeta['att_id']) ? $attMeta['att_id'] : null),
                'ident'          => $this->createIdent($attType),
                'skipForm'       => $attMeta['skipForm'],
                'formIdent'      => $attMeta['formIdent'],
                'quickFormIdent' => $attMeta['quickFormIdent'],
                'hasFaIcon'      => !!$attMeta['faIcon'],
                'faIcon'         => $attMeta['faIcon'],
                'label'          => $label,
                'val'            => $attType,
                'locked'         => $attMeta['locked'],
                'active'         => ($i == 1)
            ];
        }

        return $out;
    }
public function attachmentTypes()
    {
        $attachableObjects = $this->attachableObjects();

        $out = [];

        if (!$attachableObjects) {
            return $out;
        }

        $i = 0;
        foreach ($attachableObjects as $attType => $attMeta) {
            $i++;
            $label = $attMeta['label'];

            $out[] = [
                'id'             => (isset($attMeta['att_id']) ? $attMeta['att_id'] : null),
                'ident'          => $this->createIdent($attType),
                'skipForm'       => $attMeta['skipForm'],
                'formIdent'      => $attMeta['formIdent'],
                'quickFormIdent' => $attMeta['quickFormIdent'],
                'hasFaIcon'      => !!$attMeta['faIcon'],
                'faIcon'         => $attMeta['faIcon'],
                'label'          => $label,
                'val'            => $attType,
                'locked'         => $attMeta['locked'],
                'active'         => ($i == 1)
            ];
        }

        return $out;
    }
public function attachmentTypes ( ) { $ attachableObjects = $ this -> attachableObjects ( ) ; $ out = [ ] ; if ( ! $ attachableObjects ) { return $ out ; } $ i = 0 ; foreach ( $ attachableObjects as $ attType => $ attMeta ) { $ i ++ ; $ label = $ attMeta [ 'label' ] ; $ out [ ] = [ 'id' => ( isset ( $ attMeta [ 'att_id' ] ) ? $ attMeta [ 'att_id' ] : null ) , 'ident' => $ this -> createIdent ( $ attType ) , 'skipForm' => $ attMeta [ 'skipForm' ] , 'formIdent' => $ attMeta [ 'formIdent' ] , 'quickFormIdent' => $ attMeta [ 'quickFormIdent' ] , 'hasFaIcon' => ! ! $ attMeta [ 'faIcon' ] , 'faIcon' => $ attMeta [ 'faIcon' ] , 'label' => $ label , 'val' => $ attType , 'locked' => $ attMeta [ 'locked' ] , 'active' => ( $ i == 1 ) ] ; } return $ out ; }
Retrieve the attachment types with their collections.

@return array
Retrieve the attachment types with their collections .