Request
taoItems/Category/getExposedsByClass?id=${classUri}
Response
{ success : bool, data : { propUri : exposed } }
497915
public function getExposedsByClass()
    {
        $id = $this->getRequestParameter('id');

        if (is_null($id) || empty($id)) {
            return $this->returnBadParameter('The class URI is required');
        }

        $class = $this->getClass($id);

        $service = $this->getServiceLocator()->get(CategoryService::SERVICE_ID);

        $data = [];
        $properties = $service->getElligibleProperties($class);
        foreach ($properties as $property) {
            $data[$property->getUri()] = $service->doesExposeCategory($property);
        }

        return $this->returnSuccess($data);
    }
560625
function hasClass(el, className) {
        if (typeof el.classList == "object") {
            return el.classList.contains(className);
        } else {
            var classNameSupported = (typeof el.className == "string");
            var elClass = classNameSupported ? el.className : el.getAttribute("class");
            return classNameContainsClass(elClass, className);
        }
    }
1206128
function(api, id) {
  if(!api) {
    throw new Error('WebStorage not available.');
  }

  // get the existing entry
  var rval = api.getItem(id);

  /* Note: We check api.init because we can't do (api == localStorage)
    on IE because of "Class doesn't support Automation" exception. Only
    the flash api has an init method so this works too, but we need a
    better solution in the future. */

  // flash returns item wrapped in an object, handle special case
  if(api.init) {
    if(rval.rval === null) {
      if(rval.error) {
        var error = new Error(rval.error.message);
        error.id = rval.error.id;
        error.name = rval.error.name;
        throw error;
      }
      // no error, but also no item
      rval = null;
    } else {
      rval = rval.rval;
    }
  }

  // handle decoding
  if(rval !== null) {
    // base64-decode and json-decode data
    rval = JSON.parse(util.decode64(rval));
  }

  return rval;
}
139039
function showProperty(klassName, name, props) {

  if (klassName) {
    console.log('■' + klassName + '.' + name + 'プロパティ');
  } else {
    console.log('■' + name + 'プロパティ');
  }

  var prop = getProp(name, props);

  if (!prop) {
    console.log('(エラー) プロパティが存在しません');
    console.log();
    return;
  }

  var info = getPropInfo(name, prop);
  showCommon(info);
  switch(info.type) {
  case String:
    showString(info);
    break;
  case Number:
    showNumber(info);
    break;
  case Date:
    showDate(info);
    break;
  case Object:
    showObject(info);
    break;
  }
  if (info.description.length) {
    console.log('          説明 : ' + info.description.join(EOL + '                 '));
  }
  console.log();
}
689476
def render_to_response(self, context, **response_kwargs):
        
        context["ajax_form_id"] = self.ajax_form_id
        # context["base_template"] = "towel_bootstrap/modal.html"
        return self.response_class(
            request=self.request,
            template=self.get_template_names(),
            context=context,
            **response_kwargs
        )
783905
function getClassIndex(element, className) {
  assertType(element, Node, false, 'Invalid element specified');
  assertType(className, 'string', false, `Invalid class name: ${className}`);
  let classList = element.className.split(' ');
  return classList.indexOf(className);
}
323716
function renderItemsByFolderId(id) {
        resourceDetail.hide();
        resourcesList.show();
        folderId = id;
        urls["getResources"] = urls["getResources"] || getURL("getResources");
        var options = {
            url: urls["getResources"] + '/' + id,
            data: {mode: "exclusive"},
            success: function (data) {
                resourcesList.html(data);

                renderActionButtons();
                var items = resourcesList.find("li");
                items.click(handleItemClick);
            }
        };
        Rocket.ajax(options);
    }
1283443
function () {
            var pageComponent = this;

            loadRequested = true;

            // the page has failed to load for good... don't try anymore
            if (status === PAGE_STATUS_ERROR) {
                return false;
            }

            // don't actually load if the page is converting
            if (status === PAGE_STATUS_CONVERTING) {
                return false;
            }

            // request assets to be loaded... but only ACTUALLY load if it is
            // not loaded already
            if (status !== PAGE_STATUS_LOADED) {
                status = PAGE_STATUS_LOADING;
            }
            return $.when(pageContent.load(), pageText.load())
                .done(function handleLoadDone() {
                    if (loadRequested) {
                        if (status !== PAGE_STATUS_LOADED) {
                            $el.removeClass(CSS_CLASS_PAGE_LOADING);
                            status = PAGE_STATUS_LOADED;
                            scope.broadcast('pageload', { page: pageNum });
                        }
                    } else {
                        pageComponent.unload();
                    }
                })
                .fail(function handleLoadFail(error) {
                    status = PAGE_STATUS_ERROR;
                    $el.addClass(CSS_CLASS_PAGE_ERROR);
                    scope.broadcast('pagefail', { page: index + 1, error: error });
                });
        }
737948
function fetchCollectionAttributeHTTPInput( $collection, $collectionAttribute, $http, $base, $contentObjectAttribute )
    {
        if ( $http->hasPostVariable( $base . "_category_id_" . $contentObjectAttribute->attribute( "id" ) ))
        {
            $data = $http->postVariable( $base . "_category_id_" . $contentObjectAttribute->attribute( "id" ) );
            if ( !is_numeric( $data ) )
                $data = 0;
        }
        else
        {
            $data = 0;
        }

        $collectionAttribute->setAttribute( 'data_int', $data );
        return true;
    }
1301811
function checkIfClassHasReactRender(currentClass) {
  try {
    var getRenderMethod = currentClass.body.body.filter(function (id) {
      return id.type === 'ClassMethod' && id.key.name === 'render';
    });
    return getRenderMethod[0].body.body.filter(function (child) {
      return child.type === 'ReturnStatement';
    }).map(function (stat) {
      return stat.argument.type;
    })[0] === 'JSXElement';
  } catch (e) {
    return false;
  }
}
1049888
function(item) {
            if(!item || !item.type || !item.element)
                return false;

            switch(item.type) {
                case 'milestone':
                    return (item.element.hasClass('timeline-milestone'));
                    break;
                case 'smallItem':
                    return (item.element.hasClass('timeline-smallitem'));
                    break;
                case 'bigItem':
                    return (item.element.hasClass('timeline-bigitem'));
                    break;
                default:
                    return false;
                    break;
            }
        }
932050
function (info, classItems, first) {
            var self = this;
            self._mergeCounter = (first) ? 0 : (self._mergeCounter + 1);

            if (self._mergeCounter === 100) {
                throw ('YUIDoc detected a loop extending class ' + info.name);
            }
            if (info.extends || info.uses) {
                var hasItems = {};
                hasItems[info.extends] = 1;
                if (info.uses) {
                    info.uses.forEach(function (v) {
                        hasItems[v] = 1;
                    });
                }
                self.data.classitems.forEach(function (v) {
                    //console.error(v.class, '==', info.extends);
                    if (hasItems[v.class]) {
                        if (!v.static) {
                            var q,
                                override = self.hasProperty(classItems, v);
                            if (override === false) {
                                //This method was extended from the parent class but not over written
                                //console.error('Merging extends from', v.class, 'onto', info.name);
                                q = Y.merge({}, v);
                                q.extended_from = v.class;
                                classItems.push(q);
                            } else {
                                //This method was extended from the parent and overwritten in this class
                                q = Y.merge({}, v);
                                q = self.augmentData(q);
                                classItems[override].overwritten_from = q;
                            }
                        }
                    }
                });
                if (self.data.classes[info.extends]) {
                    if (self.data.classes[info.extends].extends || self.data.classes[info.extends].uses) {
                        //console.error('Stepping down to:', self.data.classes[info.extends]);
                        classItems = self.mergeExtends(self.data.classes[info.extends], classItems);
                    }
                }
            }
            return classItems;
        }
1254218
function( options ) {
			var out = {},
				items,
				classItems,
				x,
				i;

			this.init();
			options = (options)? options : {};
			this.getDOMContext( options );

			// if we do not have any context create error
			if(!this.rootNode || !this.document){
				return {'errors': [this.noContentErr]};
			}else{

				items = this.findRootNodes( this.rootNode, true );
				i = items.length;
				while(i--) {
					classItems = modules.domUtils.getAttributeList(items[i], 'class');
					x = classItems.length;
					while(x--) {
						// find v2 names
						if(modules.utils.startWith( classItems[x], 'h-' )){
							this.appendCount(classItems[x], 1, out);
						}
						// find v1 names
						for(var key in modules.maps) {
							// dont double count if v1 and v2 roots are present
							if(modules.maps[key].root === classItems[x] && classItems.indexOf(key) === -1) {
								this.appendCount(key, 1, out);
							}
						}
					}
				}
				var relCount = this.countRels( this.rootNode );
				if(relCount > 0){
					out.rels = relCount;
				}

				return out;
			}
		}
319432
def exposes(object, options = {})
      if Respondable.paginated?(object)
        paginated object, options
      elsif Respondable.collection?(object)
        collection object, options
      else
        if Respondable.invalid?(object)
          error! :invalid_resource, object.errors
        else
          resource object, options
        end
      end
    end
657057
function (classes) {
            var extensions = this.props.extensions;

            if (extensions && extensions.get("addClass")) {
                var data = this.getDataForExtension();
                classes = classes + " " + extensions.get("addClass").map(function (callback) {
                    try {
                        return callback(data);
                    } catch (e) {
                        console.error("Exception thrown in FileTreeView addClass provider: " + e, e.stack);
                    }
                }).filter(isDefined).toArray().join(" ");
            }

            return classes;
        }
648251
def get_visible_object_or_404(klass, *args, **kwargs):
    
    qs = _get_queryset(klass)
    # If class is publishable, find only *visible* objects
    try:
        qs = qs.visible()
    except AttributeError:
        pass  # Ignore error calling `visible()` on unpublishable class
    return get_object_or_404(qs, *args, **kwargs)
66211
def get(self, id: int) -> AssetClass:
        
        self.open_session()
        item = self.session.query(AssetClass).filter(
            AssetClass.id == id).first()
        return item