Content.php #1

  • //
  • guest/
  • perforce_software/
  • chronicle/
  • main/
  • sites/
  • all/
  • modules/
  • disqus/
  • forms/
  • Content.php
  • View
  • Commits
  • Open Download .zip Download (1 KB)
<?php
/**
 * A form to control how a Disqus conversation behaves per-content-entry.
 *
 * @copyright   2012 Perforce Software. All rights reserved.
 * @license     Please see LICENSE.txt in top-level folder of this distribution.
 * @version     <release>/<patch>
 */
class Disqus_Form_Content extends P4Cms_Form_SubForm
{
    const   FORM_KEY                = 'disqus';
    const   SHOW_CONVERSATION_KEY   = 'showConversation';

    protected static  $_defaultOptions  = array(
        Disqus_Form_Content::SHOW_CONVERSATION_KEY => true
    );

    /**
     * Defines the elements of the content Disqus sub-form.
     * Called automatically when the form object is created.
     */
    public function init()
    {
        $this->setLegend('Disqus');

        $this->addElement(
            'checkbox',
            static::SHOW_CONVERSATION_KEY,
            array(
                'label' => 'Show Conversations',
            )
        );

        // put the checkbox input before the label.
        P4Cms_Form::moveCheckboxLabel($this->getElement(static::SHOW_CONVERSATION_KEY));
    }
}
# Change User Description Committed
#1 16170 perforce_software Move Chronicle files to follow new path scheme for branching.
//guest/perforce_software/chronicle/sites/all/modules/disqus/forms/Content.php
#1 8972 Matt Attaway Initial add of the Chronicle source code