wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
class.SimplePagingController.php
Go to the documentation of this file.
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2014 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of any of the following licenses
7  * at your choice:
8  *
9  * - GNU Lesser General Public License (LGPL)
10  * http://www.gnu.org/licenses/lgpl.html
11  * - Eclipse Public License (EPL)
12  * http://www.eclipse.org/org/documents/epl-v10.php
13  *
14  * See the license.txt file distributed with this work for
15  * additional information.
16  *
17  * $Id: class.SimplePagingController.php 1462 2014-02-04 23:52:27Z iherwig $
18  */
19 require_once(BASE."wcmf/application/controller/class.PagingController.php");
20 require_once(BASE."wcmf/lib/persistence/class.PersistenceFacade.php");
21 require_once(BASE."wcmf/lib/util/class.InifileParser.php");
22 require_once(BASE."wcmf/lib/util/class.StringUtil.php");
23 
24 /**
25  * @class SimplePagingController
26  * @ingroup Controller
27  * @brief SimplePagingController is a controller demonstrating the use
28  * of PagingController for splitting long lists into several pages.
29  *
30  * <b>Input actions:</b>
31  * - see PagingController
32  *
33  * <b>Output actions:</b>
34  * - see PagingController
35  *
36  * @author ingo herwig <ingo@wemove.com>
37  */
39 {
40  /**
41  * @see PagingController::getOIDs()
42  */
43  function getOIDs()
44  {
45  // get all known types from configuration file
46  $parser = &InifileParser::getInstance();
47  $types = array_keys($parser->getSection('typemapping'));
48 
49  // get object ids from all types
50  $persistenceFacade = &PersistenceFacade::getInstance();
51  $oids = array();
52  foreach ($types as $type)
53  $oids = array_merge($oids, $persistenceFacade->getOIDs($type));
54 
55  return $oids;
56  }
57  /**
58  * @see PagingController::getDisplayText()
59  */
60  function getDisplayText(&$node)
61  {
62  return strip_tags(preg_replace("/[\r\n']/", " ", NodeUtil::getDisplayValue($node)));
63  }
64 }
65 ?>
PagingController is a controller that allows to navigate lists.
SimplePagingController is a controller demonstrating the use of PagingController for splitting long l...
getDisplayValue(&$node, $useDisplayType=false, $language=null, $values=null)