Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(74)  |  Call(74)  |  Derive(0)  |  Import(0)
Query element for value of an option.

Query a certain option for an element including 'acquisition':
search the element, then the packages upwards, then global
options.

src/a/r/archgenxml-2.6/src/archgenxml/ArchetypesGenerator.py   archgenxml(Download)
 
        if self.backreferences_support or \
           utils.isTGVTrue(self.getOption('backreferences_support', element,
                                          False)):
            if self.getOption('plone_target_version', element, 3.0) >= 3.0:
        #check wether we have to import Relation's Relation Field
        for rel in element.getFromAssociations():
            if self.getOption('relation_implementation',
                              rel,
                              'basic') == 'relations':
                useRelations = 1
 
        for rel in element.getToAssociations():
            if self.getOption('relation_implementation', rel, 'basic') == 'relations' and \
        if element.hasStereoType(self.vocabulary_container_stereotype, umlprofile=self.uml_profile):
            print >> outfile, 'from Products.ATVocabularyManager.tools import registerVocabulary'
        if self.getOption('vocabulary:type', element, None) == 'ATVocabularyManager' or \
           element.hasAttributeWithTaggedValue('vocabulary:type','ATVocabularyManager'):
            print >> outfile, 'from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary'

src/a/r/archgenxml-2.6/src/archgenxml/WorkflowGenerator.py   archgenxml(Download)
        for sm in statemachines:
            d['info'] = WorkflowInfo(sm)
            d['target_version'] = self.getOption('plone_target_version', self.package, 3.0)
 
            # start BBB warning