public function getContentTypeFieldType($contenttypeslug, $fieldname)
    {
        $contenttype = $this->getContentType($contenttypeslug);

        if (in_array($fieldname, ['datecreated', 'datechanged', 'datepublish', 'datedepublish'])) {
            return "datetime";
        } elseif (isset($contenttype['fields'][$fieldname]['type'])) {
            return $contenttype['fields'][$fieldname]['type'];
        } else {
            return false;
        }
    }
public function getContentTypeFieldType($contenttypeslug, $fieldname)
    {
        $contenttype = $this->getContentType($contenttypeslug);

        if (in_array($fieldname, ['datecreated', 'datechanged', 'datepublish', 'datedepublish'])) {
            return "datetime";
        } elseif (isset($contenttype['fields'][$fieldname]['type'])) {
            return $contenttype['fields'][$fieldname]['type'];
        } else {
            return false;
        }
    }
public function getContentTypeFieldType ( $ contenttypeslug , $ fieldname ) { $ contenttype = $ this -> getContentType ( $ contenttypeslug ) ; if ( in_array ( $ fieldname , [ 'datecreated' , 'datechanged' , 'datepublish' , 'datedepublish' ] ) ) { return "datetime" ; } elseif ( isset ( $ contenttype [ 'fields' ] [ $ fieldname ] [ 'type' ] ) ) { return $ contenttype [ 'fields' ] [ $ fieldname ] [ 'type' ] ; } else { return false ; } }
Get the fieldtype for a given contenttype and fieldname.

@param string $contenttypeslug
@param string $fieldname

@return array $fields
Get the fieldtype for a given contenttype and fieldname .