browser Package

add Module

class plone.app.tiles.browser.add.DefaultAddForm(context, request)[source]

Bases: plone.app.tiles.browser.base.TileForm, z3c.form.form.Form

Standard tile add form, which is wrapped by DefaultAddView (see below).

This form is capable of rendering the fields of any tile schema as defined by an ITileType utility.

buttons = <z3c.form.button.Buttons object at 0x10ec6e110>
handleAdd = <Handler for <Button 'save' u'Save'>>[source]
handleCancel = <Handler for <Button 'cancel' u'Cancel'>>[source]
handlers = <Handlers [<Handler for <Button 'save' u'Save'>>, <Handler for <Button 'cancel' u'Cancel'>>]>
ignoreContext = True
label[source]
name = 'add_tile'
tileId = None
tileType = None
updateActions()[source]
class plone.app.tiles.browser.add.DefaultAddView(context, request, tileType)[source]

Bases: plone.z3cform.layout.FormWrapper

This is the default add view as looked up by the @@add-tile traversal view. It is an unnamed adapter on (context, request, tileType).

Note that this is registered in ZCML as a simple <adapter />, but we also use the <class /> directive to set up security.

form

alias of DefaultAddForm

index = <BoundPageTemplateFile of None>
tileId

base Module

class plone.app.tiles.browser.base.TileForm[source]

Bases: plone.autoform.form.AutoExtensibleForm

Mixin class for tile add/edit forms, which will load the tile schema and set up an appropriate form.

additionalSchemata = ()
autoGroups = True
description[source]
prefix = ''
render()[source]
schema[source]
tileId = None
tileType = None
update()[source]
updateWidgets()[source]
class plone.app.tiles.browser.base.TileFormLayout(context, request)[source]

Bases: object

Layout view giving access to macro slots

macros[source]

edit Module

class plone.app.tiles.browser.edit.DefaultEditForm(context, request)[source]

Bases: plone.app.tiles.browser.base.TileForm, z3c.form.form.Form

Standard tile edit form, which is wrapped by DefaultEditView (see below).

This form is capable of rendering the fields of any tile schema as defined by an ITileType utility.

buttons = <z3c.form.button.Buttons object at 0x10eca7f10>
getContent()[source]
handleCancel = <Handler for <Button 'cancel' u'Cancel'>>[source]
handleSave = <Handler for <Button 'save' u'Save'>>[source]
handlers = <Handlers [<Handler for <Button 'save' u'Save'>>, <Handler for <Button 'cancel' u'Cancel'>>]>
ignoreContext = False
ignoreRequest = True
label[source]
name = 'edit_tile'
tileId = None
tileType = None
update()[source]
updateActions()[source]
class plone.app.tiles.browser.edit.DefaultEditView(context, request, tileType)[source]

Bases: plone.z3cform.layout.FormWrapper

This is the default edit view as looked up by the @@edit-tile traveral view. It is an unnamed adapter on (context, request, tileType).

Note that this is registered in ZCML as a simple <adapter />, but we also use the <class /> directive to set up security.

form

alias of DefaultEditForm

index = <BoundPageTemplateFile of None>
tileId

traversal Module

class plone.app.tiles.browser.traversal.AddTile(context, request)[source]

Bases: plone.app.tiles.browser.traversal.TileTraverser

Implements the @@add-tile traversal view

Rendering this view on its own will display a template where the user may choose a tile type to add.

Traversing to /path/to/obj/@@add-tile/tile-name will:

  • Look up the tile info for ‘tile-name’ as a named utility

  • Attempt to find view which is an adapter for (context, request,

    tile_info) with the name ‘tile-name’

  • Fall back on the unnamed adapter of the same triple

  • Return above found view for rendering

publishTraverse(request, name)[source]

Allow traversal to @@<view>/tilename

targetInterface = <InterfaceClass plone.app.tiles.interfaces.ITileAddView>
tileSortKey(type1, type2)[source]
tileTypes(*args, **kwargs)[source]
class plone.app.tiles.browser.traversal.DeleteTile(context, request)[source]

Bases: plone.app.tiles.browser.traversal.TileTraverser

Implements the @@delete-tile traversal view

Traversing to /path/to/obj/@@delete-tile will list all tiles. Traversing to /path/to/obj/@@delete-tile/tile-id will delete tile.

publishTraverse(request, name)[source]

Allow traversal to @@delete-tile/tilename

tileId = None
tiles()[source]
class plone.app.tiles.browser.traversal.EditTile(context, request)[source]

Bases: plone.app.tiles.browser.traversal.TileTraverser

Implements the @@edit-tile namespace.

Traversing to /path/to/obj/@@edit-tile/tile-name/tile-id will:

  • Look up the tile info for ‘tile-name’ as a named utility

  • Attempt to find an adapter for (context, request, tile_info) with

    the name ‘tile-name’

  • Fall back on the unnamed adapter of the same triple

  • Set the ‘tileId’ property on the view to the id ‘tile-id

  • Return the view for rendering

publishTraverse(request, name)[source]

Allow traversal to @@<view>/tilename/tileid

targetInterface = <InterfaceClass plone.app.tiles.interfaces.ITileEditView>
class plone.app.tiles.browser.traversal.TileTraverser(context, request)[source]

Bases: object

Base class for tile add/edit view traversers.

Below, we register two traversal views: @@add-tile and @@edit-tile.

getTileViewByName(tile_name)[source]

We look up for adapter from (context, request, tileType) to an appropriate interface. The default is to use the unnamed adapter, but this can be overridden by registering a named adapter with the name of the tile type. This way, a custom add/edit view can be reigstered for a particular type of tile.

targetInterface = <InterfaceClass zope.interface.Interface>
view = None

Table Of Contents

Previous topic

browser Package

Next topic

toolbar Package

This Page