This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation

Class Concrete5_Controller_Block_Survey

Controller for the survey block, which allows site owners to add surveys and uses Google's graphing web service to display results.

Extended by Controller
Extended by Concrete5_Library_BlockController
Extended by BlockController
Extended by Concrete5_Controller_Block_Survey

Direct known subclasses


Package: Blocks\Survey
Copyright: Copyright (c) 2003-2012 Concrete5. (
License: MIT License
Author: Ryan Tyler
Author: Tony Trupp
Located at core/controllers/blocks/survey.php

Methods summary

public string
# getBlockTypeDescription( )

Used for localization. If we want to localize the name/description we have to include this

public string
# getBlockTypeName( )

Returns the name of the block type

# __construct( BlockType $obj = NULL )

Instantiates the block controller.

# hasVoted( )
# delete( )

Automatically run when a block is deleted. This removes the special data from the block's specific database table. If a block needs to do more than this this method should be overridden.

public BlockRecord
# duplicate( integer $newBID )

Automatically run when a block is duplicated. This most likely happens when a block is edited: a block is first duplicated, and then presented to the user to make changes.

# save( array $args )

Run when a block is added or edited. Automatically saves block data against the block's database table. If a block needs to do more than this (save to multiple tables, upload files, etc... it should override this.

# displayChart( $bID, $cID )

Properties summary

protected string $btTable
# 'btSurvey'
protected string $btInterfaceWidth
# "420"
protected string $btInterfaceHeight
# "300"
protected array $btExportTables
# array('btSurvey','btSurveyOptions','btSurveyResults')
public array $options
# array()