def add(self, field_creation_information): """Adds a field to the field collection.""" field = Field(self.context) qry = CreateEntityQuery(self, field_creation_information) self.context.add_query(qry, field) self.add_child(field) return field
def get_by_title(self, title): """Returns the first field object in the collection based on the title of the specified field. :type title: str """ return Field( self.context, ResourcePathServiceOperation("getByTitle", [title], self.resource_path))
def get_by_internal_name_or_title(self, name_title): """Returns the first Field object with the specified internal name or title from the collection. :type name_title: str """ return Field( self.context, ResourcePathServiceOperation("getByInternalNameOrTitle", [name_title], self.resource_path))