benbyf Posted July 18, 2016 Share Posted July 18, 2016 How does one set a new field's global flag in a module? i.e. // create new field object $f = new Field(); // get a field type $f->type = $this->modules->get("FieldtypeCheckbox"); $f->name = $this->fieldName; $f->label = 'Publish Page later'; // somehow set flag to global??? $f->save(); // save the field Link to comment Share on other sites More sharing options...
kongondo Posted July 18, 2016 Share Posted July 18, 2016 @benbyf Mod Note: Please post such questions in the module development sub-forum. The main module forum is only for support of released modules Thanks. Link to comment Share on other sites More sharing options...
LostKobrakai Posted July 18, 2016 Share Posted July 18, 2016 $f->flags = Field::flagGlobal; $f->set('flags', Field::flagGlobal); $f->setFlags(Field::flagGlobal); Use what you like best. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now